[LU-5607] xattr interoperability checks removed. Created: 11/Sep/14 Updated: 24/Sep/14 Resolved: 24/Sep/14 |
|
| Status: | Closed |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.7.0 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Alexey Lyashkov | Assignee: | John Hammond |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 15686 |
| Description |
|
I like to see Intel remove a older and dead code, but it need to do more carefully. commit 281671b5ee43c2aea5d5b708aadf10fd1df45b16
Author: John L. Hammond <john.hammond@intel.com>
Date: Thu May 1 16:26:41 2014 -0500
LU-4961 lustre: remove liblustre.h and obd.h from userspace
removes a wire checks for a xattr entries. -#ifdef LIBLUSTRE_POSIX_ACL - - /* Checks for type posix_acl_xattr_entry */ - LASSERTF((int)sizeof(posix_acl_xattr_entry) == 8, "found %lld\n", - (long long)(int)sizeof(posix_acl_xattr_entry)); - LASSERTF((int)offsetof(posix_acl_xattr_entry, e_tag) == 0, "found %lld\n", so any changes in posix_acl_xattr_entry (used in wire protocol) will don't found during lustre compile. |
| Comments |
| Comment by Andreas Dilger [ 12/Sep/14 ] |
|
It is a bad idea that Lustre depends directly on struct posix_acl_xattr_entry (a kernel data structure) for the wire protocol. It would be better to define our own copy of struct lustre_acl_xattr_entry in lustre_idl.h and "convert" to/from this structure for the network RPCs. We could LASSERT() that they are the same size in the packing routines to ensure we catch any potential changes to the structure. There is not a very big risk of this structure changing in the kernel, since it is also stored directly to disk for ext2/3/4, but there may be risk of change if/when the NFSv4-style ACLs are introduced at some point. |
| Comment by Alexey Lyashkov [ 13/Sep/14 ] |
|
I have none objections over defining a own XATTR, ACL structures but it's will be more bigger patch when return a wire checks. From my point view - restore a wire checks very easy and low risk, so we may continue work with it, but introduce a new structures later. own xattr entry already exist for remote ACL code (did it need now? i think it's don't used after landing long time ago) so we have an base for new work. |
| Comment by John Hammond [ 15/Sep/14 ] |
|
Please see http://review.whamcloud.com/11933. |
| Comment by John Hammond [ 24/Sep/14 ] |
|
Patch landed to master. |