All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Brian Foster <bfoster@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH v2 1/3] xfs: add bmapi nodiscard flag
Date: Wed, 9 May 2018 04:39:42 -0700	[thread overview]
Message-ID: <20180509113942.GA17093@infradead.org> (raw)
In-Reply-To: <20180509105853.GD64624@bfoster.bfoster>

> 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.

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.

  reply	other threads:[~2018-05-09 11:39 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 [this message]
2018-05-09 12:01         ` Brian Foster
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=20180509113942.GA17093@infradead.org \
    --to=hch@infradead.org \
    --cc=bfoster@redhat.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.