From: Damien Le Moal <dlemoal@kernel.org>
To: Johannes Thumshirn <johannes.thumshirn@wdc.com>,
Naohiro Aota <naohiro.aota@wdc.com>,
Johannes Thumshirn <jth@kernel.org>,
Alasdair Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@kernel.org>,
Mikulas Patocka <mpatocka@redhat.com>,
dm-devel@lists.linux.dev, Chris Mason <clm@fb.com>,
Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>, Jaegeuk Kim <jaegeuk@kernel.org>,
Chao Yu <chao@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Chaitanya Kulkarni <kch@nvidia.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-btrfs@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Subject: Re: [PATCH v3 1/5] zonefs: pass GFP_KERNEL to blkdev_zone_mgmt() call
Date: Fri, 9 Feb 2024 16:44:22 +0900 [thread overview]
Message-ID: <7c2c7925-b21c-4861-81a7-d49f39a85e29@kernel.org> (raw)
In-Reply-To: <20240128-zonefs_nofs-v3-1-ae3b7c8def61@wdc.com>
On 1/29/24 16:52, Johannes Thumshirn wrote:
> Pass GFP_KERNEL instead of GFP_NOFS to the blkdev_zone_mgmt() call in
> zonefs_zone_mgmt().
>
> As as zonefs_zone_mgmt() and zonefs_inode_zone_mgmt() are never called
> from a place that can recurse back into the filesystem on memory reclaim,
> it is save to call blkdev_zone_mgmt() with GFP_KERNEL.
>
> Link: https://lore.kernel.org/all/ZZcgXI46AinlcBDP@casper.infradead.org/
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
> fs/zonefs/super.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
> index 93971742613a..63fbac018c04 100644
> --- a/fs/zonefs/super.c
> +++ b/fs/zonefs/super.c
> @@ -113,7 +113,7 @@ static int zonefs_zone_mgmt(struct super_block *sb,
>
> trace_zonefs_zone_mgmt(sb, z, op);
> ret = blkdev_zone_mgmt(sb->s_bdev, op, z->z_sector,
> - z->z_size >> SECTOR_SHIFT, GFP_NOFS);
> + z->z_size >> SECTOR_SHIFT, GFP_KERNEL);
> if (ret) {
> zonefs_err(sb,
> "Zone management operation %s at %llu failed %d\n",
>
Given that zonefs_inode_zone_mgmt() which calls zonefs_zone_mgmt() is only used
for sequential zone inodes, and that these inodes cannot be written with
buffered IOs, I think this is safe as we will never have dirty pages to
writeback for reclaim. So there should be no risk of re-entering the FS on
reclaim with GFP_KERNEL.
So:
Acked-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2024-02-09 7:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-29 7:52 [PATCH v3 0/5] block: remove gfp_mask for blkdev_zone_mgmt() Johannes Thumshirn
2024-01-29 7:52 ` [PATCH v3 1/5] zonefs: pass GFP_KERNEL to blkdev_zone_mgmt() call Johannes Thumshirn
2024-01-29 23:25 ` Damien Le Moal
2024-02-09 7:44 ` Damien Le Moal [this message]
2024-01-29 7:52 ` [PATCH v3 2/5] dm: dm-zoned: guard blkdev_zone_mgmt with noio scope Johannes Thumshirn
2024-01-29 23:26 ` Damien Le Moal
2024-01-30 20:48 ` Mike Snitzer
2024-01-29 7:52 ` [PATCH v3 3/5] btrfs: zoned: call blkdev_zone_mgmt in nofs scope Johannes Thumshirn
2024-01-29 23:27 ` Damien Le Moal
2024-01-31 7:15 ` David Sterba
2024-01-29 7:52 ` [PATCH v3 4/5] f2fs: guard blkdev_zone_mgmt with " Johannes Thumshirn
2024-01-29 23:27 ` Damien Le Moal
2024-01-31 7:32 ` Chao Yu
2024-01-29 7:52 ` [PATCH v3 5/5] block: remove gfp_flags from blkdev_zone_mgmt Johannes Thumshirn
2024-01-29 23:29 ` Damien Le Moal
2024-01-30 20:49 ` Mike Snitzer
2024-02-12 8:00 ` [PATCH v3 0/5] block: remove gfp_mask for blkdev_zone_mgmt() Johannes Thumshirn
2024-02-12 15:41 ` Jens Axboe
2024-03-18 20:45 ` [f2fs-dev] " patchwork-bot+f2fs
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=7c2c7925-b21c-4861-81a7-d49f39a85e29@kernel.org \
--to=dlemoal@kernel.org \
--cc=agk@redhat.com \
--cc=axboe@kernel.dk \
--cc=chao@kernel.org \
--cc=clm@fb.com \
--cc=dm-devel@lists.linux.dev \
--cc=dsterba@suse.com \
--cc=hch@lst.de \
--cc=jaegeuk@kernel.org \
--cc=johannes.thumshirn@wdc.com \
--cc=josef@toxicpanda.com \
--cc=jth@kernel.org \
--cc=kch@nvidia.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=mpatocka@redhat.com \
--cc=naohiro.aota@wdc.com \
--cc=sagi@grimberg.me \
--cc=snitzer@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).