linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] btrfs: zoned: mark relocation as writing
@ 2022-02-10  5:59 Naohiro Aota
  2022-02-10  5:59 ` [PATCH v2 1/2] fs: add asserting functions for sb_start_{write,pagefault,intwrite} Naohiro Aota
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Naohiro Aota @ 2022-02-10  5:59 UTC (permalink / raw)
  To: linux-btrfs; +Cc: johannes.thumshirn, linux-fsdevel, viro, Naohiro Aota

There is a hung_task issue with running generic/068 on an SMR
device. The hang occurs while a process is trying to thaw the
filesystem. The process is trying to take sb->s_umount to thaw the
FS. The lock is held by fsstress, which calls btrfs_sync_fs() and is
waiting for an ordered extent to finish. However, as the FS is frozen,
the ordered extent never finish.

Having an ordered extent while the FS is frozen is the root cause of
the hang. The ordered extent is initiated from btrfs_relocate_chunk()
which is called from btrfs_reclaim_bgs_work().

The first patch is a preparation patch to add asserting functions to
check if sb_start_{write,pagefault,intwrite} is called.

The second patch adds sb_{start,end}_write and the assert function at
proper places.

Changelog:
v2:
  - Implement asserting functions not to directly touch the internal
    implementation

Naohiro Aota (2):
  fs: add asserting functions for sb_start_{write,pagefault,intwrite}
  btrfs: zoned: mark relocation as writing

 fs/btrfs/block-group.c |  8 +++++++-
 fs/btrfs/volumes.c     |  6 ++++++
 include/linux/fs.h     | 20 ++++++++++++++++++++
 3 files changed, 33 insertions(+), 1 deletion(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-02-16  3:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-10  5:59 [PATCH v2 0/2] btrfs: zoned: mark relocation as writing Naohiro Aota
2022-02-10  5:59 ` [PATCH v2 1/2] fs: add asserting functions for sb_start_{write,pagefault,intwrite} Naohiro Aota
2022-02-14 21:35   ` Dave Chinner
2022-02-14 22:49     ` Damien Le Moal
2022-02-15  0:05       ` Dave Chinner
2022-02-15  0:07         ` Damien Le Moal
2022-02-16  3:02         ` Naohiro Aota
2022-02-10  5:59 ` [PATCH v2 2/2] btrfs: zoned: mark relocation as writing Naohiro Aota
2022-02-10 13:03 ` [PATCH v2 0/2] " Johannes Thumshirn
2022-02-14 17:22 ` David Sterba

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