diff options
author | Tejun Heo <tj@kernel.org> | 2016-09-06 12:35:56 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-09-06 12:35:56 -0400 |
commit | 2536524a91fe5c5a9fddd282fd4e79ee0976aefe (patch) | |
tree | 30eb5b4cd6d9ed4fda69526537d4fac454cbc5e6 /fs/xfs/libxfs/xfs_alloc.c | |
parent | 7d36dd00ab8d57134cce86ad4febc2f5bbdf3e72 (diff) | |
parent | bc4dee5aa72723632a1f83fd0d3720066c93b433 (diff) | |
download | linux-2536524a91fe5c5a9fddd282fd4e79ee0976aefe.tar.gz linux-2536524a91fe5c5a9fddd282fd4e79ee0976aefe.tar.bz2 linux-2536524a91fe5c5a9fddd282fd4e79ee0976aefe.zip |
Merge branch 'master' into for-4.9
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_alloc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c index 776ae2f325d1..05b5243d89f6 100644 --- a/fs/xfs/libxfs/xfs_alloc.c +++ b/fs/xfs/libxfs/xfs_alloc.c @@ -1582,6 +1582,7 @@ xfs_alloc_ag_vextent_small( xfs_extlen_t *flenp, /* result length */ int *stat) /* status: 0-freelist, 1-normal/none */ { + struct xfs_owner_info oinfo; int error; xfs_agblock_t fbno; xfs_extlen_t flen; @@ -1624,6 +1625,18 @@ xfs_alloc_ag_vextent_small( error0); args->wasfromfl = 1; trace_xfs_alloc_small_freelist(args); + + /* + * If we're feeding an AGFL block to something that + * doesn't live in the free space, we need to clear + * out the OWN_AG rmap. + */ + xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_AG); + error = xfs_rmap_free(args->tp, args->agbp, args->agno, + fbno, 1, &oinfo); + if (error) + goto error0; + *stat = 0; return 0; } @@ -2264,6 +2277,9 @@ xfs_alloc_log_agf( offsetof(xfs_agf_t, agf_longest), offsetof(xfs_agf_t, agf_btreeblks), offsetof(xfs_agf_t, agf_uuid), + offsetof(xfs_agf_t, agf_rmap_blocks), + /* needed so that we don't log the whole rest of the structure: */ + offsetof(xfs_agf_t, agf_spare64), sizeof(xfs_agf_t) }; |