linux/fs/xfs
Christoph Hellwig c17a1c0349 xfs: use a seprate member to track space availabe in the GC scatch buffer
When scratch_head wraps back to 0 and scratch_tail is also 0 because no
I/O has completed yet, the ring buffer could be mistaken for empty.

Fix this by introducing a separate scratch_available member in
struct xfs_zone_gc_data.  This actually ends up simplifying the code as
well.

Reported-by: Chris Mason <clm@meta.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
2026-01-29 10:57:18 +01:00
..
libxfs xfs: improve shortform attr performance [2/3] 2026-01-28 10:16:12 +01:00
scrub xfs: check for deleted cursors when revalidating two btrees 2026-01-24 08:46:43 -08:00
Kconfig xfs: XFS_ONLINE_SCRUB_STATS should depend on DEBUG_FS 2025-10-21 09:52:59 +02:00
Makefile xfs: add media verification ioctl 2026-01-20 18:06:52 -08:00
xfs_acl.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_acl.h
xfs_aops.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_aops.h xfs: implement direct writes to zoned RT devices 2025-03-03 08:17:07 -07:00
xfs_attr_inactive.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_attr_item.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_attr_item.h xfs: don't use a xfs_log_iovec for attr_item names and values 2025-07-24 17:30:15 +02:00
xfs_attr_list.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_bio_io.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_bmap_item.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_bmap_item.h xfs: add helpers to compute log item overhead 2025-05-07 14:25:30 -07:00
xfs_bmap_util.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_bmap_util.h xfs: implement buffered writes to zoned RT devices 2025-03-03 08:17:07 -07:00
xfs_buf.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_buf.h xfs: don't set bt_nr_sectors to a negative number 2025-10-22 10:04:39 +02:00
xfs_buf_item.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_buf_item.h xfs: don't use a xfs_log_iovec for ri_buf in log recovery 2025-07-24 17:30:15 +02:00
xfs_buf_item_recover.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_buf_mem.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_buf_mem.h xfs: cleanup mapping tmpfs folios into the buffer cache 2025-03-10 14:29:44 +01:00
xfs_dahash_test.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_dahash_test.h
xfs_dir2_readdir.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_discard.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_discard.h xfs: ignore discard return value 2025-12-16 08:49:56 +01:00
xfs_dquot.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_dquot.h xfs: remove xfs_qm_dqput and optimize dropping dquot references 2025-11-11 11:45:58 +01:00
xfs_dquot_item.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_dquot_item.h xfs: attach dquot buffer to dquot log item buffer 2024-12-12 17:45:11 -08:00
xfs_dquot_item_recover.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_drain.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_drain.h xfs: allow queued realtime intents to drain before scrubbing 2024-12-23 13:06:06 -08:00
xfs_error.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_error.h xfs: remove pointless externs in xfs_error.h 2025-09-18 17:32:02 +02:00
xfs_exchmaps_item.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_exchmaps_item.h
xfs_exchrange.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_exchrange.h
xfs_export.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_export.h
xfs_extent_busy.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_extent_busy.h xfs: don't allocate the xfs_extent_busy structure for zoned RTGs 2025-07-18 17:42:31 +02:00
xfs_extfree_item.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_extfree_item.h xfs: remove the xfs_efd_log_format_t typedef 2025-09-16 12:25:05 +02:00
xfs_file.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_file.h
xfs_filestream.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_filestream.h
xfs_fsmap.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_fsmap.h
xfs_fsops.c xfs: autonomous self healing of filesystems [v7] 2026-01-28 10:02:20 +01:00
xfs_fsops.h xfs: support reserved blocks for the rt extent counter 2025-03-03 08:16:43 -07:00
xfs_globals.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_handle.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_handle.h
xfs_health.c xfs: autonomous self healing of filesystems [v7] 2026-01-28 10:02:20 +01:00
xfs_healthmon.c xfs: autonomous self healing of filesystems [v7] 2026-01-28 10:02:20 +01:00
xfs_healthmon.h xfs: convey file I/O errors to the health monitor 2026-01-20 18:06:50 -08:00
xfs_hooks.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_hooks.h
xfs_icache.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_icache.h
xfs_icreate_item.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_icreate_item.h
xfs_inode.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_inode.h xfs: disallow atomic writes on DAX 2025-08-11 14:03:44 +02:00
xfs_inode_item.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_inode_item.h xfs: rework datasync tracking and execution 2025-09-23 15:12:43 +02:00
xfs_inode_item_recover.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_ioctl.c xfs: autonomous self healing of filesystems [v7] 2026-01-28 10:02:20 +01:00
xfs_ioctl.h tree-wide: s/struct fileattr/struct file_kattr/g 2025-07-04 16:14:39 +02:00
xfs_ioctl32.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_ioctl32.h
xfs_iomap.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_iomap.h iomap: replace iomap_folio_ops with iomap_write_ops 2025-07-14 10:51:33 +02:00
xfs_iops.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_iops.h xfs: refine atomic write size check in xfs_file_write_iter() 2025-05-07 14:25:31 -07:00
xfs_itable.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_itable.h xfs: remove XFS_IBULK_SAME_AG 2025-08-11 14:03:31 +02:00
xfs_iunlink_item.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_iunlink_item.h
xfs_iwalk.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_iwalk.h
xfs_log.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_log.h xfs: move struct xfs_log_vec to xfs_log_priv.h 2026-01-21 12:57:16 +01:00
xfs_log_cil.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_log_priv.h xfs: move struct xfs_log_vec to xfs_log_priv.h 2026-01-21 12:57:16 +01:00
xfs_log_recover.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_message.c xfs: promote metadata directories and large block support 2026-01-21 12:57:17 +01:00
xfs_message.h xfs: promote metadata directories and large block support 2026-01-21 12:57:17 +01:00
xfs_mount.c xfs: autonomous self healing of filesystems [v7] 2026-01-28 10:02:20 +01:00
xfs_mount.h xfs: start creating infrastructure for health monitoring 2026-01-20 18:06:45 -08:00
xfs_mru_cache.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_mru_cache.h
xfs_notify_failure.c xfs: autonomous self healing of filesystems [v7] 2026-01-28 10:02:20 +01:00
xfs_notify_failure.h xfs: react to fsdax failure notifications on the rt device 2024-12-23 13:06:09 -08:00
xfs_platform.h xfs: autonomous self healing of filesystems [v7] 2026-01-28 10:02:20 +01:00
xfs_pnfs.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_pnfs.h
xfs_pwork.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_pwork.h
xfs_qm.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_qm.h xfs: make qi_dquots a 64-bit value 2025-11-11 11:45:57 +01:00
xfs_qm_bhv.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_qm_syscalls.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_quota.h xfs: prepare to reuse the dquot pointer space in struct xfs_inode 2024-12-23 13:06:03 -08:00
xfs_quotaops.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_refcount_item.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_refcount_item.h xfs: add helpers to compute log item overhead 2025-05-07 14:25:30 -07:00
xfs_reflink.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_reflink.h xfs: use the new ->i_state accessors 2025-10-20 20:22:27 +02:00
xfs_rmap_item.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_rmap_item.h xfs: add helpers to compute log item overhead 2025-05-07 14:25:30 -07:00
xfs_rtalloc.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_rtalloc.h xfs: make metabtree reservations global 2025-03-03 08:16:43 -07:00
xfs_stats.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_stats.h xfs: introduce realtime refcount btree ondisk definitions 2024-12-23 13:06:10 -08:00
xfs_super.c xfs: autonomous self healing of filesystems [v7] 2026-01-28 10:02:20 +01:00
xfs_super.h xfs: react to fsdax failure notifications on the rt device 2024-12-23 13:06:09 -08:00
xfs_symlink.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_symlink.h
xfs_sysctl.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_sysctl.h xfs: remove deprecated sysctl knobs 2025-09-05 08:48:23 -07:00
xfs_sysfs.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_sysfs.h xfs: contain more sysfs code in xfs_sysfs.c 2025-03-03 08:17:10 -07:00
xfs_trace.c xfs: autonomous self healing of filesystems [v7] 2026-01-28 10:02:20 +01:00
xfs_trace.h xfs: improve shortform attr performance [2/3] 2026-01-28 10:16:12 +01:00
xfs_trans.c xfs: fix incorrect context handling in xfs_trans_roll 2026-01-21 12:59:10 +01:00
xfs_trans.h xfs: fix incorrect context handling in xfs_trans_roll 2026-01-21 12:59:10 +01:00
xfs_trans_ail.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_trans_buf.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_trans_dquot.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_trans_priv.h xfs: remove the leftover xfs_{set,clear}_li_failed infrastructure 2025-04-14 10:24:30 +02:00
xfs_verify_media.c xfs: autonomous self healing of filesystems [v7] 2026-01-28 10:02:20 +01:00
xfs_verify_media.h xfs: add media verification ioctl 2026-01-20 18:06:52 -08:00
xfs_xattr.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_xattr.h
xfs_zone_alloc.c xfs: always allocate the free zone with the lowest index 2026-01-21 12:57:17 +01:00
xfs_zone_alloc.h xfs: stop passing an inode to the zone space reservation helpers 2025-07-24 17:30:14 +02:00
xfs_zone_gc.c xfs: use a seprate member to track space availabe in the GC scatch buffer 2026-01-29 10:57:18 +01:00
xfs_zone_info.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfs_zone_priv.h xfs: always allocate the free zone with the lowest index 2026-01-21 12:57:17 +01:00
xfs_zone_space_resv.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00