Commit 27c0b5c4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'xfs-fixes-6.18-rc3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs fixes from Carlos Maiolino:
 "The main highlight here is a fix for a bug brought in by the removal
  of attr2 mount option, where some installations might actually have
  'attr2' explicitly configured in fstab preventing system to boot by
  not being able to remount the rootfs as RW.

  Besides that there are a couple fix to the zonefs implementation,
  changing XFS_ONLINE_SCRUB_STATS to depend on DEBUG_FS (was select
  before), and some other minor changes"

* tag 'xfs-fixes-6.18-rc3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: fix locking in xchk_nlinks_collect_dir
  xfs: loudly complain about defunct mount options
  xfs: always warn about deprecated mount options
  xfs: don't set bt_nr_sectors to a negative number
  xfs: don't use __GFP_NOFAIL in xfs_init_fs_context
  xfs: cache open zone in inode->i_private
  xfs: avoid busy loops in GCD
  xfs: XFS_ONLINE_SCRUB_STATS should depend on DEBUG_FS
  xfs: do not tightly pack-write large files
  xfs: Improve CONFIG_XFS_RT Kconfig help
parents 566771af f477af0c
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -119,6 +119,15 @@ config XFS_RT

	  See the xfs man page in section 5 for additional information.

	  This option is mandatory to support zoned block devices. For these
	  devices, the realtime subvolume must be backed by a zoned block
	  device and a regular block device used as the main device (for
	  metadata). If the zoned block device is a host-managed SMR hard-disk
	  containing conventional zones at the beginning of its address space,
	  XFS will use the disk conventional zones as the main device and the
	  remaining sequential write required zones as the backing storage for
	  the realtime subvolume.

	  If unsure, say N.

config XFS_DRAIN_INTENTS
@@ -156,7 +165,7 @@ config XFS_ONLINE_SCRUB_STATS
	bool "XFS online metadata check usage data collection"
	default y
	depends on XFS_ONLINE_SCRUB
	select DEBUG_FS
	depends on DEBUG_FS
	help
	  If you say Y here, the kernel will gather usage data about
	  the online metadata check subsystem.  This includes the number
+31 −3
Original line number Diff line number Diff line
@@ -376,6 +376,36 @@ xchk_nlinks_collect_pptr(
	return error;
}

static uint
xchk_nlinks_ilock_dir(
	struct xfs_inode	*ip)
{
	uint			lock_mode = XFS_ILOCK_SHARED;

	/*
	 * We're going to scan the directory entries, so we must be ready to
	 * pull the data fork mappings into memory if they aren't already.
	 */
	if (xfs_need_iread_extents(&ip->i_df))
		lock_mode = XFS_ILOCK_EXCL;

	/*
	 * We're going to scan the parent pointers, so we must be ready to
	 * pull the attr fork mappings into memory if they aren't already.
	 */
	if (xfs_has_parent(ip->i_mount) && xfs_inode_has_attr_fork(ip) &&
	    xfs_need_iread_extents(&ip->i_af))
		lock_mode = XFS_ILOCK_EXCL;

	/*
	 * Take the IOLOCK so that other threads cannot start a directory
	 * update while we're scanning.
	 */
	lock_mode |= XFS_IOLOCK_SHARED;
	xfs_ilock(ip, lock_mode);
	return lock_mode;
}

/* Walk a directory to bump the observed link counts of the children. */
STATIC int
xchk_nlinks_collect_dir(
@@ -394,8 +424,7 @@ xchk_nlinks_collect_dir(
		return 0;

	/* Prevent anyone from changing this directory while we walk it. */
	xfs_ilock(dp, XFS_IOLOCK_SHARED);
	lock_mode = xfs_ilock_data_map_shared(dp);
	lock_mode = xchk_nlinks_ilock_dir(dp);

	/*
	 * The dotdot entry of an unlinked directory still points to the last
@@ -452,7 +481,6 @@ xchk_nlinks_collect_dir(
	xchk_iscan_abort(&xnc->collect_iscan);
out_unlock:
	xfs_iunlock(dp, lock_mode);
	xfs_iunlock(dp, XFS_IOLOCK_SHARED);
	return error;
}

+1 −1
Original line number Diff line number Diff line
@@ -1751,7 +1751,7 @@ xfs_init_buftarg(
	const char			*descr)
{
	/* The maximum size of the buftarg is only known once the sb is read. */
	btp->bt_nr_sectors = (xfs_daddr_t)-1;
	btp->bt_nr_sectors = XFS_BUF_DADDR_MAX;

	/* Set up device logical sector size mask */
	btp->bt_logical_sectorsize = logical_sectorsize;
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ extern struct kmem_cache *xfs_buf_cache;
 */
struct xfs_buf;

#define XFS_BUF_DADDR_MAX	((xfs_daddr_t) S64_MAX)
#define XFS_BUF_DADDR_NULL	((xfs_daddr_t) (-1LL))

#define XBF_READ	 (1u << 0) /* buffer intended for reading from device */
+0 −1
Original line number Diff line number Diff line
@@ -236,7 +236,6 @@ typedef struct xfs_mount {
	bool			m_update_sb;	/* sb needs update in mount */
	unsigned int		m_max_open_zones;
	unsigned int		m_zonegc_low_space;
	struct xfs_mru_cache	*m_zone_cache;  /* Inode to open zone cache */

	/* max_atomic_write mount option value */
	unsigned long long	m_awu_max_bytes;
Loading