[XFS] Fix a problem in aligning inode allocations to stripe unit
boundaries. SGI-PV: 951862 SGI-Modid: xfs-linux-melb:xfs-kern:25726a Signed-off-by: Nathan Scott <nathans@sgi.com>
This commit is contained in:
@@ -158,9 +158,10 @@ xfs_ialloc_ag_alloc(
|
|||||||
*/
|
*/
|
||||||
agi = XFS_BUF_TO_AGI(agbp);
|
agi = XFS_BUF_TO_AGI(agbp);
|
||||||
newino = be32_to_cpu(agi->agi_newino);
|
newino = be32_to_cpu(agi->agi_newino);
|
||||||
if(likely(newino != NULLAGINO)) {
|
args.agbno = XFS_AGINO_TO_AGBNO(args.mp, newino) +
|
||||||
args.agbno = XFS_AGINO_TO_AGBNO(args.mp, newino) +
|
XFS_IALLOC_BLOCKS(args.mp);
|
||||||
XFS_IALLOC_BLOCKS(args.mp);
|
if (likely(newino != NULLAGINO &&
|
||||||
|
(args.agbno < be32_to_cpu(agi->agi_length)))) {
|
||||||
args.fsbno = XFS_AGB_TO_FSB(args.mp,
|
args.fsbno = XFS_AGB_TO_FSB(args.mp,
|
||||||
be32_to_cpu(agi->agi_seqno), args.agbno);
|
be32_to_cpu(agi->agi_seqno), args.agbno);
|
||||||
args.type = XFS_ALLOCTYPE_THIS_BNO;
|
args.type = XFS_ALLOCTYPE_THIS_BNO;
|
||||||
|
Reference in New Issue
Block a user