linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/3] xfs: allocate xattr buffer on demand
Date: Thu, 29 Aug 2019 04:02:00 -0700	[thread overview]
Message-ID: <20190829110200.GA16151@infradead.org> (raw)
In-Reply-To: <20190829104516.GU1119@dread.disaster.area>

On Thu, Aug 29, 2019 at 08:45:16PM +1000, Dave Chinner wrote:
> > Given that all three callers pass ATTR_ALLOC, do we even need a flag
> 
> Only one caller passes ATTR_ALLOC - the ACL code. The other two
> have their own buffers that are supplied....

Oops, I misread the patch as all three callers changed, but not
actually to pass the flag but just for the different buffer passing.

That being said - xfs_attrmulti_attr_get can trivially use this
scheme.  And for the VFS call it would also make sense, but it
would be a huge change, so maybe some other time.

> Can't overwrite args->valuelen until we've done the ERANGE check.
> Sure, I could put it in a local variable, but that doesn't reduce
> the amount of code, or make it obvious that we intentionally return
> the attribute size when the supplied buffer it too small...

Ok.

      reply	other threads:[~2019-08-29 11:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20190829110200.GA16151@infradead.org \
    --to=hch@infradead.org \
    --cc=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 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).