Whamcloud - gitweb
LU-10030 idl: use proper ATTR/MDS_ATTR/MDS_OPEN flags 07/32107/6
authorAndreas Dilger <andreas.dilger@intel.com>
Fri, 19 Oct 2018 03:43:11 +0000 (23:43 -0400)
committerOleg Drokin <green@whamcloud.com>
Mon, 29 Oct 2018 16:01:22 +0000 (16:01 +0000)
commit9c2ffe39bd32f85dab4fbb13855112e57b1dbc5a
tree6889a4201da84b6b743cc1515f060a3697bc8a87
parentf2bf876ef77ed8eda2eeb1b78ead85c1a7a8f81e
LU-10030 idl: use proper ATTR/MDS_ATTR/MDS_OPEN flags

Add proper MDS_ATTR_* and MDS_OPEN_* flags for different flags
namespaces.  The MDS_OPEN_OWNEROVERRIDE was being mapped into
the MDS_ATTR_* flags in some cases.  This did not conflict yet, but
add separate ATTR_OVERRIDE and MDS_ATTR_OVERRIDE flags for this use
so they don't conflict in the future.

Remove the MDS_OPEN_CROSS flag, since this was only used internally
as a hack to pass open flags to mdd_permission(), but was truncating
the u64 open flags to a 32-bit int in the process.  Do the convert
to MAY_* flags at the MDT layer instead of inside mdd_permission()
by moving the accmode() flag conversion into lustre_mds.h code.

The ATTR_OPEN flag has existed since kernel 2.6.27, so we can always
use that directly instead of the ATTR_FROM_OPEN flag we #defined.
The ATTR_RAW flag is no longer used at all and can be removed.

Rename various "flags" uses in the code to "open_flags" so that it
is more clear which flags values are being used.  This exposed a few
places in the code where we were using an int to pass these flags, but
some of the MDS_OPEN_* flags are using 64-bit values already.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I833a6e6102f947a9276cb6bf03826fd4a5ecab07
Reviewed-on: https://review.whamcloud.com/32107
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 files changed:
lustre/include/lustre_mds.h
lustre/include/lustre_patchless_compat.h
lustre/include/md_object.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/llite/file.c
lustre/mdc/mdc_lib.c
lustre/mdd/mdd_internal.h
lustre/mdd/mdd_object.c
lustre/mdd/mdd_permission.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_lib.c
lustre/mdt/mdt_open.c
lustre/ptlrpc/wiretest.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c