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 'xfs-fixes-6.17-rc4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs fixes from Carlos Maiolino:
"The highlight I'd like to point here is related to the XFS_RT
Kconfig, which has been updated to be enabled by default now if
CONFIG_BLK_DEV_ZONED is enabled.

This also contains a few fixes for zoned devices support in XFS,
specially related to swapon requests in inodes belonging to the zoned
FS.

A null-ptr dereference fix in the xattr data, due to a mishandling of
medium errors generated by block devices is also included"

* tag 'xfs-fixes-6.17-rc4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
xfs: do not propagate ENODATA disk errors into xattr code
xfs: reject swapon for inodes on a zoned file system earlier
xfs: kick off inodegc when failing to reserve zoned blocks
xfs: remove xfs_last_used_zone
xfs: Default XFS_RT to Y if CONFIG_BLK_DEV_ZONED is enabled

+25 -43
+1
fs/xfs/Kconfig
··· 105 105 config XFS_RT 106 106 bool "XFS Realtime subvolume support" 107 107 depends on XFS_FS 108 + default BLK_DEV_ZONED 108 109 help 109 110 If you say Y here you will be able to mount and use XFS filesystems 110 111 which contain a realtime subvolume. The realtime subvolume is a
+7
fs/xfs/libxfs/xfs_attr_remote.c
··· 435 435 0, &bp, &xfs_attr3_rmt_buf_ops); 436 436 if (xfs_metadata_is_sick(error)) 437 437 xfs_dirattr_mark_sick(args->dp, XFS_ATTR_FORK); 438 + /* 439 + * ENODATA from disk implies a disk medium failure; 440 + * ENODATA for xattrs means attribute not found, so 441 + * disambiguate that here. 442 + */ 443 + if (error == -ENODATA) 444 + error = -EIO; 438 445 if (error) 439 446 return error; 440 447
+6
fs/xfs/libxfs/xfs_da_btree.c
··· 2833 2833 &bp, ops); 2834 2834 if (xfs_metadata_is_sick(error)) 2835 2835 xfs_dirattr_mark_sick(dp, whichfork); 2836 + /* 2837 + * ENODATA from disk implies a disk medium failure; ENODATA for 2838 + * xattrs means attribute not found, so disambiguate that here. 2839 + */ 2840 + if (error == -ENODATA && whichfork == XFS_ATTR_FORK) 2841 + error = -EIO; 2836 2842 if (error) 2837 2843 goto out_free; 2838 2844
+3
fs/xfs/xfs_aops.c
··· 760 760 { 761 761 struct xfs_inode *ip = XFS_I(file_inode(swap_file)); 762 762 763 + if (xfs_is_zoned_inode(ip)) 764 + return -EINVAL; 765 + 763 766 /* 764 767 * Swap file activation can race against concurrent shared extent 765 768 * removal in files that have been cloned. If this happens,
+2 -43
fs/xfs/xfs_zone_alloc.c
··· 374 374 return 0; 375 375 } 376 376 377 - /* 378 - * Check if the zone containing the data just before the offset we are 379 - * writing to is still open and has space. 380 - */ 381 - static struct xfs_open_zone * 382 - xfs_last_used_zone( 383 - struct iomap_ioend *ioend) 384 - { 385 - struct xfs_inode *ip = XFS_I(ioend->io_inode); 386 - struct xfs_mount *mp = ip->i_mount; 387 - xfs_fileoff_t offset_fsb = XFS_B_TO_FSB(mp, ioend->io_offset); 388 - struct xfs_rtgroup *rtg = NULL; 389 - struct xfs_open_zone *oz = NULL; 390 - struct xfs_iext_cursor icur; 391 - struct xfs_bmbt_irec got; 392 - 393 - xfs_ilock(ip, XFS_ILOCK_SHARED); 394 - if (!xfs_iext_lookup_extent_before(ip, &ip->i_df, &offset_fsb, 395 - &icur, &got)) { 396 - xfs_iunlock(ip, XFS_ILOCK_SHARED); 397 - return NULL; 398 - } 399 - xfs_iunlock(ip, XFS_ILOCK_SHARED); 400 - 401 - rtg = xfs_rtgroup_grab(mp, xfs_rtb_to_rgno(mp, got.br_startblock)); 402 - if (!rtg) 403 - return NULL; 404 - 405 - xfs_ilock(rtg_rmap(rtg), XFS_ILOCK_SHARED); 406 - oz = READ_ONCE(rtg->rtg_open_zone); 407 - if (oz && (oz->oz_is_gc || !atomic_inc_not_zero(&oz->oz_ref))) 408 - oz = NULL; 409 - xfs_iunlock(rtg_rmap(rtg), XFS_ILOCK_SHARED); 410 - 411 - xfs_rtgroup_rele(rtg); 412 - return oz; 413 - } 414 - 415 377 static struct xfs_group * 416 378 xfs_find_free_zone( 417 379 struct xfs_mount *mp, ··· 880 918 goto out_error; 881 919 882 920 /* 883 - * If we don't have a cached zone in this write context, see if the 884 - * last extent before the one we are writing to points to an active 885 - * zone. If so, just continue writing to it. 921 + * If we don't have a locally cached zone in this write context, see if 922 + * the inode is still associated with a zone and use that if so. 886 923 */ 887 - if (!*oz && ioend->io_offset) 888 - *oz = xfs_last_used_zone(ioend); 889 924 if (!*oz) 890 925 *oz = xfs_cached_zone(mp, ip); 891 926
+6
fs/xfs/xfs_zone_space_resv.c
··· 10 10 #include "xfs_mount.h" 11 11 #include "xfs_inode.h" 12 12 #include "xfs_rtbitmap.h" 13 + #include "xfs_icache.h" 13 14 #include "xfs_zone_alloc.h" 14 15 #include "xfs_zone_priv.h" 15 16 #include "xfs_zones.h" ··· 231 230 232 231 error = xfs_dec_freecounter(mp, XC_FREE_RTEXTENTS, count_fsb, 233 232 flags & XFS_ZR_RESERVED); 233 + if (error == -ENOSPC && !(flags & XFS_ZR_NOWAIT)) { 234 + xfs_inodegc_flush(mp); 235 + error = xfs_dec_freecounter(mp, XC_FREE_RTEXTENTS, count_fsb, 236 + flags & XFS_ZR_RESERVED); 237 + } 234 238 if (error == -ENOSPC && (flags & XFS_ZR_GREEDY) && count_fsb > 1) 235 239 error = xfs_zoned_reserve_extents_greedy(mp, &count_fsb, flags); 236 240 if (error)