public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs: zoned: kick reclaim earlier on fast zoned devices
@ 2024-01-22 10:51 Johannes Thumshirn
  2024-01-22 10:51 ` [PATCH 1/2] btrfs: zoned: use rcu list for iterating devices to collect stats Johannes Thumshirn
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Johannes Thumshirn @ 2024-01-22 10:51 UTC (permalink / raw)
  To: Josef Bacik, David Sterba
  Cc: Naohiro Aota, linux-btrfs, linux-kernel, Johannes Thumshirn,
	Damien Le Moal

We had a report from the field where filling a zoned drive with one file
60% of the drive's capacity and then overwriting this file results in
ENOSPC.

If said drive is fast and small enough, the problem can be easily
triggered, as both reclaim of dirty block-groups and deletion of unused
block-groups only happen at transaction commit time. But if the whole test
is faster than we're doing transaction commits we're unnecessarily running
out of usable space on a zoned drive.

This can easily be reproduced by the following fio snippet:
fio --name=foo --filename=$TEST/foo --size=$60_PERCENT_OF_DRIVE --rw=write\
	   --loops=2

A fstests testcase for this issue will be sent as well.

---
Johannes Thumshirn (2):
      btrfs: zoned: use rcu list for iterating devices to collect stats
      btrfs: zoned: wake up cleaner sooner if needed

 fs/btrfs/free-space-cache.c | 6 ++++++
 fs/btrfs/zoned.c            | 6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)
---
base-commit: d9796b728dcbf25e0190e542be33902222098fac
change-id: 20240122-reclaim-fix-1fcae9c27fc8

Best regards,
-- 
Johannes Thumshirn <johannes.thumshirn@wdc.com>


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

end of thread, other threads:[~2024-01-23 18:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-22 10:51 [PATCH 0/2] btrfs: zoned: kick reclaim earlier on fast zoned devices Johannes Thumshirn
2024-01-22 10:51 ` [PATCH 1/2] btrfs: zoned: use rcu list for iterating devices to collect stats Johannes Thumshirn
2024-01-22 12:12   ` Naohiro Aota
2024-01-22 21:34   ` David Sterba
2024-01-23  7:49     ` Johannes Thumshirn
2024-01-23 18:35       ` David Sterba
2024-01-22 10:51 ` [PATCH 2/2] btrfs: zoned: wake up cleaner sooner if needed Johannes Thumshirn
2024-01-22 12:22   ` Naohiro Aota
2024-01-22 12:30     ` Johannes Thumshirn
2024-01-22 14:39       ` Naohiro Aota
2024-01-22 14:43         ` Johannes Thumshirn
2024-01-22 15:26           ` Naohiro Aota
2024-01-22 23:51   ` Boris Burkov
2024-01-22 16:04 ` [PATCH 0/2] btrfs: zoned: kick reclaim earlier on fast zoned devices Johannes Thumshirn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox