From: Brian Foster <bfoster@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org, Dave Chinner <david@fromorbit.com>
Subject: Re: [PATCH v2 1/3] xfs: add bmapi nodiscard flag
Date: Wed, 9 May 2018 08:01:51 -0400 [thread overview]
Message-ID: <20180509120150.GA65322@bfoster.bfoster> (raw)
In-Reply-To: <20180509113942.GA17093@infradead.org>
On Wed, May 09, 2018 at 04:39:42AM -0700, Christoph Hellwig wrote:
> > I deliberately went away from that approach based on Dave's feedback
> > (similarly with the xfs_itruncate_extents() comment in the subsequent
> > patch). I used the bool that is used here rather than pass the flag
> > directly, but it's essentially the same idea in terms of exposing the
> > function signature change to callers.
>
> I haven't had time to catch up on the previous iterations, sorry.
>
> >
> > TBH, I don't much care which of the N possible variants of code
> > factoring we use here, but I think we're officially bikeshedding once
> > the feedback starts to go in circles as such. ;) So unless I see some
> > broader/mutual agreement (or a strong preference from the maintainer) on
> > a change back to something like the original factoring (perhaps using a
> > flag instead of a bool), I'm going to assume changing it back will
> > simply reintroduce the previous feedback and leave this as is.
>
> FYI, I really hate trivial rappers that just hide a single argument.
> There are a few use cases for them, mostly because the API has a lot
> of pre-existing callers that don't care and it would create too much
> churn. But creating wrappers for both possible arguments of a bool
> is just silly.
>
Reasonable argument, for sure...
> Also in general bools can be ver confusing, especially once we grow
> more than one in a given prototype. If we already only use it to set
> a flag deeper down I much, much prefer to expose the flag as it is
> self-documenting, very much unlike a 'true' or 'false' argument.
I'm fine with replacing the bool argument(s) with flags where applicable
if we do eliminate the wrappers. I'm just hesitant to change it given
the previous feedback to move away from something very close..
Dave, care to chime in here? As mentioned, I'll do a refactored v3 if
there's some kind of consensus/agreement on a final approach.
Brian
next prev parent reply other threads:[~2018-05-09 12:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-08 17:22 [PATCH v2 0/3] xfs: skip unnecessary discards Brian Foster
2018-05-08 17:22 ` [PATCH v2 1/3] xfs: add bmapi nodiscard flag Brian Foster
2018-05-08 18:12 ` Darrick J. Wong
2018-05-09 1:28 ` Darrick J. Wong
2018-05-09 10:56 ` Brian Foster
2018-05-09 7:46 ` Christoph Hellwig
2018-05-09 10:58 ` Brian Foster
2018-05-09 11:39 ` Christoph Hellwig
2018-05-09 12:01 ` Brian Foster [this message]
2018-05-09 12:07 ` Christoph Hellwig
2018-05-09 12:47 ` Brian Foster
2018-05-10 8:25 ` Christoph Hellwig
2018-05-08 17:22 ` [PATCH v2 2/3] xfs: skip online discard during eofblocks trims Brian Foster
2018-05-08 18:14 ` Darrick J. Wong
2018-05-09 7:40 ` Christoph Hellwig
2018-05-08 17:22 ` [PATCH v2 3/3] xfs: don't discard on free of unwritten extents Brian Foster
2018-05-08 18:14 ` Darrick J. Wong
2018-05-09 7:40 ` 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=20180509120150.GA65322@bfoster.bfoster \
--to=bfoster@redhat.com \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--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