Skip to content

Commit 0b0128e

Browse files
committed
Merge tag 'xfs-merge-7.1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull xfs updates from Carlos Maiolino: "There aren't any new features. The whole series is just a collection of bug fixes and code refactoring. There is some new information added a couple new tracepoints, new data added to mountstats, but no big changes" * tag 'xfs-merge-7.1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (41 commits) xfs: fix number of GC bvecs xfs: untangle the open zones reporting in mountinfo xfs: expose the number of open zones in sysfs xfs: reduce special casing for the open GC zone xfs: streamline GC zone selection xfs: refactor GC zone selection helpers xfs: rename xfs_zone_gc_iter_next to xfs_zone_gc_iter_irec xfs: put the open zone later xfs_open_zone_put xfs: add a separate tracepoint for stealing an open zone for GC xfs: delay initial open of the GC zone xfs: fix a resource leak in xfs_alloc_buftarg() xfs: handle too many open zones when mounting xfs: refactor xfs_mount_zones xfs: fix integer overflow in busy extent sort comparator xfs: fix integer overflow in deferred intent sort comparators xfs: fold xfs_setattr_size into xfs_vn_setattr_size xfs: remove a duplicate assert in xfs_setattr_size xfs: return default quota limits for IDs without a dquot xfs: start gc on zonegc_low_space attribute updates xfs: don't decrement the buffer LRU count for in-use buffers ...
2 parents 230fb3a + 2ffc690 commit 0b0128e

26 files changed

Lines changed: 744 additions & 539 deletions

Documentation/admin-guide/xfs.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,10 @@ For zoned file systems, the following attributes are exposed in:
550550
is limited by the capabilities of the backing zoned device, file system
551551
size and the max_open_zones mount option.
552552

553+
nr_open_zones (Min: 0 Default: Varies Max: UINTMAX)
554+
This read-only attribute exposes the current number of open zones
555+
used by the file system.
556+
553557
zonegc_low_space (Min: 0 Default: 0 Max: 100)
554558
Define a percentage for how much of the unused space that GC should keep
555559
available for writing. A high value will reclaim more of the space

fs/iomap/buffered-io.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,16 +1647,12 @@ iomap_zero_range(struct inode *inode, loff_t pos, loff_t len, bool *did_zero,
16471647
while ((ret = iomap_iter(&iter, ops)) > 0) {
16481648
const struct iomap *srcmap = iomap_iter_srcmap(&iter);
16491649

1650-
if (WARN_ON_ONCE((iter.iomap.flags & IOMAP_F_FOLIO_BATCH) &&
1651-
srcmap->type != IOMAP_UNWRITTEN))
1652-
return -EIO;
1653-
16541650
if (!(iter.iomap.flags & IOMAP_F_FOLIO_BATCH) &&
16551651
(srcmap->type == IOMAP_HOLE ||
16561652
srcmap->type == IOMAP_UNWRITTEN)) {
16571653
s64 status;
16581654

1659-
if (range_dirty) {
1655+
if (range_dirty && srcmap->type == IOMAP_UNWRITTEN) {
16601656
range_dirty = false;
16611657
status = iomap_zero_iter_flush_and_stale(&iter);
16621658
} else {

fs/xfs/libxfs/xfs_ag.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,7 @@ xfs_perag_uninit(
110110
struct xfs_group *xg)
111111
{
112112
#ifdef __KERNEL__
113-
struct xfs_perag *pag = to_perag(xg);
114-
115-
cancel_delayed_work_sync(&pag->pag_blockgc_work);
116-
xfs_buf_cache_destroy(&pag->pag_bcache);
113+
cancel_delayed_work_sync(&to_perag(xg)->pag_blockgc_work);
117114
#endif
118115
}
119116

@@ -235,10 +232,6 @@ xfs_perag_alloc(
235232
INIT_RADIX_TREE(&pag->pag_ici_root, GFP_ATOMIC);
236233
#endif /* __KERNEL__ */
237234

238-
error = xfs_buf_cache_init(&pag->pag_bcache);
239-
if (error)
240-
goto out_free_perag;
241-
242235
/*
243236
* Pre-calculated geometry
244237
*/
@@ -250,12 +243,10 @@ xfs_perag_alloc(
250243

251244
error = xfs_group_insert(mp, pag_group(pag), index, XG_TYPE_AG);
252245
if (error)
253-
goto out_buf_cache_destroy;
246+
goto out_free_perag;
254247

255248
return 0;
256249

257-
out_buf_cache_destroy:
258-
xfs_buf_cache_destroy(&pag->pag_bcache);
259250
out_free_perag:
260251
kfree(pag);
261252
return error;

fs/xfs/libxfs/xfs_ag.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ struct xfs_perag {
8585
int pag_ici_reclaimable; /* reclaimable inodes */
8686
unsigned long pag_ici_reclaim_cursor; /* reclaim restart point */
8787

88-
struct xfs_buf_cache pag_bcache;
89-
9088
/* background prealloc block trimming */
9189
struct delayed_work pag_blockgc_work;
9290
#endif /* __KERNEL__ */

fs/xfs/libxfs/xfs_fs.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,14 +995,17 @@ struct xfs_rtgroup_geometry {
995995
__u32 rg_sick; /* o: sick things in ag */
996996
__u32 rg_checked; /* o: checked metadata in ag */
997997
__u32 rg_flags; /* i/o: flags for this ag */
998-
__u32 rg_reserved[27]; /* o: zero */
998+
__u32 rg_writepointer; /* o: write pointer block offset for zoned */
999+
__u32 rg_reserved[26]; /* o: zero */
9991000
};
10001001
#define XFS_RTGROUP_GEOM_SICK_SUPER (1U << 0) /* superblock */
10011002
#define XFS_RTGROUP_GEOM_SICK_BITMAP (1U << 1) /* rtbitmap */
10021003
#define XFS_RTGROUP_GEOM_SICK_SUMMARY (1U << 2) /* rtsummary */
10031004
#define XFS_RTGROUP_GEOM_SICK_RMAPBT (1U << 3) /* reverse mappings */
10041005
#define XFS_RTGROUP_GEOM_SICK_REFCNTBT (1U << 4) /* reference counts */
10051006

1007+
#define XFS_RTGROUP_GEOM_WRITEPOINTER (1U << 0) /* write pointer */
1008+
10061009
/* Health monitor event domains */
10071010

10081011
/* affects the whole fs */

0 commit comments

Comments
 (0)