Whamcloud - gitweb
LU-64 Modify the behavior of ioctl on directories without EA set.
This patch introduces the following functionality:
1. If an ioctl is performed to obtain the stripe attributes for a
directory, then the following 3 possibilities can occur:
a. If the directory in question DOES have it's EA set, then these
EA values are returned to userspace.
b. If the directory in question DOES NOT have it's EA set, AND it
IS the root directory of the filesystem, then the filesystem's
default EA values are returned to userspace.
c. If the directory in question DOES NOT have it's EA set, AND it
IS NOT the root directory of the filesystem, then no EA values
are returned to userspace. Rather, an error is returned from
the ioctl and errno is set to ENODATA.
2. lfs getstripe was updated to reflect this change in the ioctl
interface.
a. If lfs getstipe --raw is called on a directory other than the
root directory of the filesystem, and this directory does not
have any EA set, the filesystem's default values will not be
printed. Rather, the raw values which mean "use the default"
will be printed (e.g. stripe count: 0, stripe size: 0, stripe
offset: -1).
Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: Ieaaeaf54cce88f406008af4a926fac561900afc9
Reviewed-on: http://review.whamcloud.com/576
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>