All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH 0/3 v2] xfs: allocate xattr buffer on demand
Date: Wed, 28 Aug 2019 14:23:47 +1000	[thread overview]
Message-ID: <20190828042350.6062-1-david@fromorbit.com> (raw)

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.


             reply	other threads:[~2019-08-28  4:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28  4:23 Dave Chinner [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190828042350.6062-1-david@fromorbit.com \
    --to=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.