Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-5.13-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fix from David Sterba:
"One more fix, for a space accounting bug in zoned mode. It happens
when a block group is switched back rw->ro and unusable bytes (due to
zoned constraints) are subtracted twice.

It has user visible effects so I consider it important enough for late
-rc inclusion and backport to stable"

* tag 'for-5.13-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
btrfs: zoned: fix negative space_info->bytes_readonly

+4 -4
+4 -4
fs/btrfs/block-group.c
··· 2442 2442 spin_lock(&sinfo->lock); 2443 2443 spin_lock(&cache->lock); 2444 2444 if (!--cache->ro) { 2445 - num_bytes = cache->length - cache->reserved - 2446 - cache->pinned - cache->bytes_super - 2447 - cache->zone_unusable - cache->used; 2448 - sinfo->bytes_readonly -= num_bytes; 2449 2445 if (btrfs_is_zoned(cache->fs_info)) { 2450 2446 /* Migrate zone_unusable bytes back */ 2451 2447 cache->zone_unusable = cache->alloc_offset - cache->used; 2452 2448 sinfo->bytes_zone_unusable += cache->zone_unusable; 2453 2449 sinfo->bytes_readonly -= cache->zone_unusable; 2454 2450 } 2451 + num_bytes = cache->length - cache->reserved - 2452 + cache->pinned - cache->bytes_super - 2453 + cache->zone_unusable - cache->used; 2454 + sinfo->bytes_readonly -= num_bytes; 2455 2455 list_del_init(&cache->ro_list); 2456 2456 } 2457 2457 spin_unlock(&cache->lock);