Commit f83fcb87 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'xfs-merge-6.16' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs updates from Carlos Maiolino:

 - Atomic writes for XFS

 - Remove experimental warnings for pNFS, scrub and parent pointers

* tag 'xfs-merge-6.16' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (26 commits)
  xfs: add inode to zone caching for data placement
  xfs: free the item in xfs_mru_cache_insert on failure
  xfs: remove the EXPERIMENTAL warning for pNFS
  xfs: remove some EXPERIMENTAL warnings
  xfs: Remove deprecated xfs_bufd sysctl parameters
  xfs: stop using set_blocksize
  xfs: allow sysadmins to specify a maximum atomic write limit at mount time
  xfs: update atomic write limits
  xfs: add xfs_calc_atomic_write_unit_max()
  xfs: add xfs_file_dio_write_atomic()
  xfs: commit CoW-based atomic writes atomically
  xfs: add large atomic writes checks in xfs_direct_write_iomap_begin()
  xfs: add xfs_atomic_write_cow_iomap_begin()
  xfs: refine atomic write size check in xfs_file_write_iter()
  xfs: refactor xfs_reflink_end_cow_extent()
  xfs: allow block allocator to take an alignment hint
  xfs: ignore HW which cannot atomic write a single block
  xfs: add helpers to compute transaction reservation for finishing intent items
  xfs: add helpers to compute log item overhead
  xfs: separate out setting buftarg atomic writes limits
  ...
parents 79b98edf f3e2e538
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -151,6 +151,17 @@ When mounting an XFS filesystem, the following options are accepted.
	optional, and the log section can be separate from the data
	section or contained within it.

  max_atomic_write=value
	Set the maximum size of an atomic write.  The size may be
	specified in bytes, in kilobytes with a "k" suffix, in megabytes
	with a "m" suffix, or in gigabytes with a "g" suffix.  The size
	cannot be larger than the maximum write size, larger than the
	size of any allocation group, or larger than the size of a
	remapping operation that the log can complete atomically.

	The default value is to set the maximum I/O completion size
	to allow each CPU to handle one at a time.

  max_open_zones=value
	Specify the max number of zones to keep open for writing on a
	zoned rt device. Many open zones aids file data separation
+2 −1
Original line number Diff line number Diff line
@@ -1335,7 +1335,8 @@ void bdev_statx(const struct path *path, struct kstat *stat, u32 request_mask)

		generic_fill_statx_atomic_writes(stat,
			queue_atomic_write_unit_min_bytes(bd_queue),
			queue_atomic_write_unit_max_bytes(bd_queue));
			queue_atomic_write_unit_max_bytes(bd_queue),
			0);
	}

	stat->blksize = bdev_io_min(bdev);
+1 −1
Original line number Diff line number Diff line
@@ -5692,7 +5692,7 @@ int ext4_getattr(struct mnt_idmap *idmap, const struct path *path,
			awu_max = sbi->s_awu_max;
		}

		generic_fill_statx_atomic_writes(stat, awu_min, awu_max);
		generic_fill_statx_atomic_writes(stat, awu_min, awu_max, 0);
	}

	flags = ei->i_flags & EXT4_FL_USER_VISIBLE;
+5 −1
Original line number Diff line number Diff line
@@ -136,13 +136,15 @@ EXPORT_SYMBOL(generic_fill_statx_attr);
 * @stat:	Where to fill in the attribute flags
 * @unit_min:	Minimum supported atomic write length in bytes
 * @unit_max:	Maximum supported atomic write length in bytes
 * @unit_max_opt: Optimised maximum supported atomic write length in bytes
 *
 * Fill in the STATX{_ATTR}_WRITE_ATOMIC flags in the kstat structure from
 * atomic write unit_min and unit_max values.
 */
void generic_fill_statx_atomic_writes(struct kstat *stat,
				      unsigned int unit_min,
				      unsigned int unit_max)
				      unsigned int unit_max,
				      unsigned int unit_max_opt)
{
	/* Confirm that the request type is known */
	stat->result_mask |= STATX_WRITE_ATOMIC;
@@ -153,6 +155,7 @@ void generic_fill_statx_atomic_writes(struct kstat *stat,
	if (unit_min) {
		stat->atomic_write_unit_min = unit_min;
		stat->atomic_write_unit_max = unit_max;
		stat->atomic_write_unit_max_opt = unit_max_opt;
		/* Initially only allow 1x segment */
		stat->atomic_write_segments_max = 1;

@@ -741,6 +744,7 @@ cp_statx(const struct kstat *stat, struct statx __user *buffer)
	tmp.stx_atomic_write_unit_min = stat->atomic_write_unit_min;
	tmp.stx_atomic_write_unit_max = stat->atomic_write_unit_max;
	tmp.stx_atomic_write_segments_max = stat->atomic_write_segments_max;
	tmp.stx_atomic_write_unit_max_opt = stat->atomic_write_unit_max_opt;

	return copy_to_user(buffer, &tmp, sizeof(tmp)) ? -EFAULT : 0;
}
+5 −0
Original line number Diff line number Diff line
@@ -3312,6 +3312,11 @@ xfs_bmap_compute_alignments(
		align = xfs_get_cowextsz_hint(ap->ip);
	else if (ap->datatype & XFS_ALLOC_USERDATA)
		align = xfs_get_extsz_hint(ap->ip);

	/* Try to align start block to any minimum allocation alignment */
	if (align > 1 && (ap->flags & XFS_BMAPI_EXTSZALIGN))
		args->alignment = align;

	if (align) {
		if (xfs_bmap_extsize_align(mp, &ap->got, &ap->prev, align, 0,
					ap->eof, 0, ap->conv, &ap->offset,
Loading