mirror of https://github.com/torvalds/linux.git
Fixes for 6.2-rc1:
- Remove some incorrect assertions.
- Fix compiler warnings about variables that could be static.
- Fix an off by one error when computing the maximum btree height that
can cause repair failures.
- Fix the bulkstat-single ioctl not returning the root inode when asked
to do that.
- Convey NOFS state to inodegc workers to avoid recursion in reclaim.
- Fix unnecessary variable initializations.
- Fix a bug that could result in corruption of the busy extent tree.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEUzaAxoMeQq6m2jMV+H93GTRKtOsFAmO29K4ACgkQ+H93GTRK
tOtzKQ//cOz2OIQoNUnrHCrGEy7hd1HmSwTRfDbJtP6F38b3cygEhXzPBDN5J6+7
/u/rqAfjmSe/upIjrVJ30agbSoPqSmVBY+P0rGoTCnlbdVLakVy2Cj5NDJO8UrMm
neqHU7dNZNoCZb8phqS7U7+fUYDgNB9BM9m0b/vaIOwOBYUupvQ3M5DH+claCjDh
3PNpTmNhuMmQrURB7XlbPQSq9cznGtVwqHu8Q4O1obfxQwlmcbJ/0aJ2asDleeAo
zPQDZuPxtgISZ3hqpMBD9qZaHY2jEB0TY0FNZJkw01byNDTxvEPEO5jCOK+RJkNJ
WFi+5Rd+DgxHITiqzL3ks+kv64ATFjyZHScp9JRpU7a6h2zuq2MDnRAUJo5DUxqT
q6WGrJewmGZE/nSCKezpxH61iR9AiYPcM5m4nX1KXUfQajwCrYyKPRMSijw25Xn4
rzF5/YQZhEIquzqHhet7kQJgZhmYROzrybaZ4tY8fZPJ3uAQb/sMCE08CgBowmrB
u7bG+SU7tyX0HkpKNPv8Vnfcd3Fh94k83tEEGHaMY5VEi5GiKaa6w+a90DLRZcOI
ZGRQG6df7Ot7uMFZftMZxJV9E5Pi7FbrKotUaw7/5SdAYkoAZ4CYzmpGc9KOFmmh
EffHdkR7ppFxC8EhYjKIWtlSspJZmJqPbqQ1x0FTQCpq0V+FbNY=
=tWyP
-----END PGP SIGNATURE-----
Merge tag 'xfs-6.2-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull xfs fixes from Darrick Wong:
- Remove some incorrect assertions
- Fix compiler warnings about variables that could be static
- Fix an off by one error when computing the maximum btree height that
can cause repair failures
- Fix the bulkstat-single ioctl not returning the root inode when asked
to do that
- Convey NOFS state to inodegc workers to avoid recursion in reclaim
- Fix unnecessary variable initializations
- Fix a bug that could result in corruption of the busy extent tree
* tag 'xfs-6.2-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
xfs: fix extent busy updating
xfs: xfs_qm: remove unnecessary ‘0’ values from error
xfs: Fix deadlock on xfs_inodegc_worker
xfs: get root inode correctly at bulkstat
xfs: fix off-by-one error in xfs_btree_space_to_height
xfs: make xfs_iomap_page_ops static
xfs: don't assert if cmap covers imap after cycling lock
This commit is contained in:
commit
1fe4fd6f5c
|
|
@ -4666,7 +4666,12 @@ xfs_btree_space_to_height(
|
|||
const unsigned int *limits,
|
||||
unsigned long long leaf_blocks)
|
||||
{
|
||||
unsigned long long node_blocks = limits[1];
|
||||
/*
|
||||
* The root btree block can have fewer than minrecs pointers in it
|
||||
* because the tree might not be big enough to require that amount of
|
||||
* fanout. Hence it has a minimum size of 2 pointers, not limits[1].
|
||||
*/
|
||||
unsigned long long node_blocks = 2;
|
||||
unsigned long long blocks_left = leaf_blocks - 1;
|
||||
unsigned int height = 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -236,6 +236,7 @@ xfs_extent_busy_update_extent(
|
|||
*
|
||||
*/
|
||||
busyp->bno = fend;
|
||||
busyp->length = bend - fend;
|
||||
} else if (bbno < fbno) {
|
||||
/*
|
||||
* Case 8:
|
||||
|
|
|
|||
|
|
@ -1853,12 +1853,20 @@ xfs_inodegc_worker(
|
|||
struct xfs_inodegc, work);
|
||||
struct llist_node *node = llist_del_all(&gc->list);
|
||||
struct xfs_inode *ip, *n;
|
||||
unsigned int nofs_flag;
|
||||
|
||||
WRITE_ONCE(gc->items, 0);
|
||||
|
||||
if (!node)
|
||||
return;
|
||||
|
||||
/*
|
||||
* We can allocate memory here while doing writeback on behalf of
|
||||
* memory reclaim. To avoid memory allocation deadlocks set the
|
||||
* task-wide nofs context for the following operations.
|
||||
*/
|
||||
nofs_flag = memalloc_nofs_save();
|
||||
|
||||
ip = llist_entry(node, struct xfs_inode, i_gclist);
|
||||
trace_xfs_inodegc_worker(ip->i_mount, READ_ONCE(gc->shrinker_hits));
|
||||
|
||||
|
|
@ -1867,6 +1875,8 @@ xfs_inodegc_worker(
|
|||
xfs_iflags_set(ip, XFS_INACTIVATING);
|
||||
xfs_inodegc_inactivate(ip);
|
||||
}
|
||||
|
||||
memalloc_nofs_restore(nofs_flag);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -754,7 +754,7 @@ xfs_bulkstat_fmt(
|
|||
static int
|
||||
xfs_bulk_ireq_setup(
|
||||
struct xfs_mount *mp,
|
||||
struct xfs_bulk_ireq *hdr,
|
||||
const struct xfs_bulk_ireq *hdr,
|
||||
struct xfs_ibulk *breq,
|
||||
void __user *ubuffer)
|
||||
{
|
||||
|
|
@ -780,7 +780,7 @@ xfs_bulk_ireq_setup(
|
|||
|
||||
switch (hdr->ino) {
|
||||
case XFS_BULK_IREQ_SPECIAL_ROOT:
|
||||
hdr->ino = mp->m_sb.sb_rootino;
|
||||
breq->startino = mp->m_sb.sb_rootino;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ xfs_iomap_valid(
|
|||
return true;
|
||||
}
|
||||
|
||||
const struct iomap_page_ops xfs_iomap_page_ops = {
|
||||
static const struct iomap_page_ops xfs_iomap_page_ops = {
|
||||
.iomap_valid = xfs_iomap_valid,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ xfs_qm_dquot_walk(
|
|||
|
||||
while (1) {
|
||||
struct xfs_dquot *batch[XFS_DQ_LOOKUP_BATCH];
|
||||
int error = 0;
|
||||
int error;
|
||||
int i;
|
||||
|
||||
mutex_lock(&qi->qi_tree_lock);
|
||||
|
|
|
|||
|
|
@ -416,8 +416,6 @@ xfs_reflink_fill_cow_hole(
|
|||
goto convert;
|
||||
}
|
||||
|
||||
ASSERT(cmap->br_startoff > imap->br_startoff);
|
||||
|
||||
/* Allocate the entire reservation as unwritten blocks. */
|
||||
nimaps = 1;
|
||||
error = xfs_bmapi_write(tp, ip, imap->br_startoff, imap->br_blockcount,
|
||||
|
|
|
|||
Loading…
Reference in New Issue