Skip to contentSkip to conversation

Patch "xfs: BMAPX shouldn't barf on inline-format directories" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jun 5, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

xfs: BMAPX shouldn't barf on inline-format directories

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
xfs-bmapx-shouldn-t-barf-on-inline-format-directories.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 6eadbf4c8ba816c10d1c97bed9aa861d9fd17809 Mon Sep 17 00:00:00 2001

From: "Darrick J. Wong" <[email protected]>
Date: Fri, 12 May 2017 10:44:08 -0700
Subject: xfs: BMAPX shouldn't barf on inline-format directories

From: Darrick J. Wong <[email protected]>

commit 6eadbf4c8ba816c10d1c97bed9aa861d9fd17809 upstream.

When we're fulfilling a BMAPX request, jump out early if the data fork is in local format. This prevents us from hitting a debugging check in bmapi_read and barfing errors back to userspace. The on-disk extent count check later isn't sufficient for IF_DELALLOC mode because da extents are in memory and not on disk.

---
 fs/xfs/xfs_bmap_util.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
fs/xfs/xfs_bmap_util.c +6 -2
@@ -588,9 +588,13 @@ xfs_getbmap(
 		}
 		break;
 	default:
+		/* Local format data forks report no extents. */
+		if (ip->i_d.di_format == XFS_DINODE_FMT_LOCAL) {
+			bmv->bmv_entries = 0;
+			return 0;
+		}
 		if (ip->i_d.di_format != XFS_DINODE_FMT_EXTENTS &&
-		    ip->i_d.di_format != XFS_DINODE_FMT_BTREE &&
-		    ip->i_d.di_format != XFS_DINODE_FMT_LOCAL)
+		    ip->i_d.di_format != XFS_DINODE_FMT_BTREE)
 			return -EINVAL;
 
 		if (xfs_get_extsz_hint(ip) ||

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/xfs-fix-missed-holes-in-seek_hole-implementation.patch queue-4.9/xfs-fix-indlen-accounting-error-on-partial-delalloc-conversion.patch queue-4.9/xfs-fix-over-copying-of-getbmap-parameters-from-userspace.patch queue-4.9/xfs-bad-assertion-for-delalloc-an-extent-that-start-at-i_size.patch queue-4.9/xfs-bmapx-shouldn-t-barf-on-inline-format-directories.patch queue-4.9/xfs-drop-iolock-from-reclaim-context-to-appease-lockdep.patch queue-4.9/xfs-fix-off-by-one-on-max-nr_pages-in-xfs_find_get_desired_pgoff.patch queue-4.9/xfs-update-ag-iterator-to-support-wait-on-new-inodes.patch queue-4.9/xfs-use-dedicated-log-worker-wq-to-avoid-deadlock-with-cil-wq.patch queue-4.9/xfs-fix-up-quotacheck-buffer-list-error-handling.patch queue-4.9/xfs-wait-on-new-inodes-during-quotaoff-dquot-release.patch queue-4.9/xfs-rework-the-inline-directory-verifiers.patch queue-4.9/xfs-use-b_state-to-fix-buffer-i-o-accounting-release-race.patch queue-4.9/xfs-avoid-mount-time-deadlock-in-cow-extent-recovery.patch queue-4.9/xfs-fix-off-by-in-in-loop-termination-in-xfs_find_get_desired_pgoff.patch queue-4.9/xfs-xfs_trans_alloc_empty.patch queue-4.9/xfs-fix-integer-truncation-in-xfs_bmap_remap_alloc.patch queue-4.9/xfs-actually-report-xattr-extents-via-iomap.patch queue-4.9/xfs-fix-use-after-free-in-xfs_finish_page_writeback.patch queue-4.9/xfs-reserve-enough-blocks-to-handle-btree-splits-when-remapping.patch queue-4.9/xfs-support-ability-to-wait-on-new-inodes.patch queue-4.9/xfs-verify-inline-directory-data-forks.patch queue-4.9/xfs-prevent-multi-fsb-dir-readahead-from-reading-random-blocks.patch queue-4.9/xfs-fix-unaligned-access-in-xfs_btree_visit_blocks.patch queue-4.9/xfs-handle-array-index-overrun-in-xfs_dir2_leaf_readbuf.patch queue-4.9/xfs-fix-kernel-memory-exposure-problems.patch