Whamcloud - gitweb
LU-64 Modify the behavior of ioctl on directories without EA set.
authorPrakash Surya <surya1@llnl.gov>
Wed, 27 Apr 2011 18:03:32 +0000 (11:03 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 7 Jun 2011 03:04:06 +0000 (20:04 -0700)
commita77212cd13627b2b9f1835c48599e91c82aeed9d
treebbbccca51353a36351038dad32c027862e2612c9
parent93339415b8d74c0a2c74ee053aed23540b89bccb
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>
lustre/mdd/mdd_object.c
lustre/tests/sanity.sh
lustre/utils/liblustreapi.c