diff options
| author | 2014-12-09 16:19:16 -0500 | |
|---|---|---|
| committer | 2015-01-21 17:15:41 -0500 | |
| commit | 2ef47eb1aee171ecf1d83311b9f7fae80f330181 (patch) | |
| tree | effb243e90b0aebf66686c7fcca48c93351f33b6 /lib/mpi/mpi-internal.h | |
| parent | NFSv4.1: Fix an Oops in nfs41_walk_client_list (diff) | |
| download | wireguard-linux-2ef47eb1aee171ecf1d83311b9f7fae80f330181.tar.xz wireguard-linux-2ef47eb1aee171ecf1d83311b9f7fae80f330181.zip | |
NFS: Fix use of nfs_attr_use_mounted_on_fileid()
This function call was being optimized out during nfs_fhget(), leading
to situations where we have a valid fileid but still want to use the
mounted_on_fileid.  For example, imagine we have our server configured
like this:
server % df
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1       9.1G  6.5G  1.9G  78% /
/dev/vdb1       487M  2.3M  456M   1% /exports
/dev/vdc1       487M  2.3M  456M   1% /exports/vol1
/dev/vdd1       487M  2.3M  456M   1% /exports/vol2
If our client mounts /exports and tries to do a "chown -R" across the
entire mountpoint, we will get a nasty message warning us about a circular
directory structure.  Running chown with strace tells me that each directory
has the same device and inode number:
newfstatat(AT_FDCWD, "/nfs/", {st_dev=makedev(0, 38), st_ino=2, ...}) = 0
newfstatat(4, "vol1", {st_dev=makedev(0, 38), st_ino=2, ...}) = 0
newfstatat(4, "vol2", {st_dev=makedev(0, 38), st_ino=2, ...}) = 0
With this patch the mounted_on_fileid values are used for st_ino, so the
directory loop warning isn't reported.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'lib/mpi/mpi-internal.h')
0 files changed, 0 insertions, 0 deletions
