All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Sarthak Kukreti <sarthakkukreti@chromium.org>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Bart Van Assche <bvanassche@acm.org>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	stable@vger.kernel.org, "Darrick J . Wong" <djwong@kernel.org>,
	Christoph Hellwig <hch@lst.de>, Mike Snitzer <snitzer@kernel.org>
Subject: Re: [PATCH] block: Don't invalidate pagecache for invalid falloc modes
Date: Wed, 11 Oct 2023 15:54:10 -0600	[thread overview]
Message-ID: <8edda030-9394-4252-bf43-3cb1207cf640@kernel.dk> (raw)
In-Reply-To: <b068c2ef-5de3-44fb-a55d-2cbe5a7f1158@kernel.dk>

On 10/11/23 2:20 PM, Jens Axboe wrote:
> On 10/11/23 2:12 PM, Sarthak Kukreti wrote:
>> Only call truncate_bdev_range() if the fallocate mode is
>> supported. This fixes a bug where data in the pagecache
>> could be invalidated if the fallocate() was called on the
>> block device with an invalid mode.
> 
> Fix looks fine, but would be nicer if we didn't have to duplicate the
> truncate_bdev_range() in each switch clause. Can we check this upfront
> instead?

Don't see a good way to do it on my end, so let's just go with what is
there now. I applied it with the commit message reformatted.

-- 
Jens Axboe


  parent reply	other threads:[~2023-10-11 21:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11 20:12 [PATCH] block: Don't invalidate pagecache for invalid falloc modes Sarthak Kukreti
2023-10-11 20:20 ` Jens Axboe
2023-10-11 20:50   ` Mike Snitzer
2023-10-11 20:53     ` Jens Axboe
2023-10-11 21:08       ` Mike Snitzer
2023-10-11 21:20         ` Jens Axboe
2023-10-11 21:54   ` Jens Axboe [this message]
2023-10-11 21:54 ` [PATCH] " Jens Axboe

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=8edda030-9394-4252-bf43-3cb1207cf640@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=darrick.wong@oracle.com \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sarthakkukreti@chromium.org \
    --cc=snitzer@kernel.org \
    --cc=stable@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.