linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3 v2] xfs: allocate xattr buffer on demand
@ 2019-08-28  4:23 Dave Chinner
  2019-08-28  4:23 ` [PATCH 1/3] xfs: make attr lookup returns consistent Dave Chinner
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Dave Chinner @ 2019-08-28  4:23 UTC (permalink / raw)
  To: linux-xfs

Ok, this one works on v4 format filesystems with 256 byte inodes.

Three patches now, the first cleans up the error returns from
the shortform, leaf and node for attritbute value retrieval. The
existing code conflates the lookup function return values with the
return values needed for retreiving the attribute values.

That is, shortform returns -EEXIST to indicate that the attribute
exists and was retrieved, and returns -ENOATTR is it didn't exist.

Leaf and node form return zero if it was retrieved, -ENOATTR is it
didn't exist, and some other negative error if something else went
wrong. And some of the return values are hidden several layers deep
in the remote attribute read code.

SO the first patch cleans this all up and makes it consistent, and
cleans up some of the error checking and remote attribute retrieval
for leaf/node format code.

The second patch folds the remote attr retreival into the
xfs_attr_leaf_getvalue() function, rather than doing it on return
and having to check all over again whether the attr was a remote
attr.

The thrid patch what remains of the original single patch - it
factors out the copying of the attribute value from the shortform
and leaf code, making them all use the same code for buffer
allocation and remote value retrieval. The high level code is
modified to allow the retrieval code to allocate the buffer on
demand.

The previous patch failed because ACLs in leaf format attributes are
only covered by the xfstests "attr" group when using 256 byte
inodes.  generic/318 creates an acl that doesn't fit in line in a
256 byte inode, so it was tripping over the return value
inconsistency that the first patch in this series fixes up.

Cheers,

Dave.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-08-29 11:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28  4:23 [PATCH 0/3 v2] xfs: allocate xattr buffer on demand Dave Chinner
2019-08-28  4:23 ` [PATCH 1/3] xfs: make attr lookup returns consistent Dave Chinner
2019-08-28 22:03   ` Darrick J. Wong
2019-08-29  7:41   ` Christoph Hellwig
2019-08-29 10:32     ` Dave Chinner
2019-08-28  4:23 ` [PATCH 2/3] xfs: move remote attr retrieval into xfs_attr3_leaf_getvalue Dave Chinner
2019-08-28 22:01   ` Darrick J. Wong
2019-08-29  7:46   ` Christoph Hellwig
2019-08-28  4:23 ` [PATCH 3/3] xfs: allocate xattr buffer on demand Dave Chinner
2019-08-28 22:00   ` Darrick J. Wong
2019-08-29  7:55   ` Christoph Hellwig
2019-08-29 10:45     ` Dave Chinner
2019-08-29 11:02       ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).