Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89445
b: refs/heads/master
c: 6d1337b
h: refs/heads/master
i:
  89443: d1d7d10
v: v3
  • Loading branch information
Tim Shimmin authored and Lachlan McIlroy committed Apr 18, 2008
1 parent 9000978 commit 67706fa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb49dbb130e17a6f9af4cb4714cf6976cf09afdf
refs/heads/master: 6d1337b29bf09a97682d39db36ac2d0dfc6659c0
15 changes: 10 additions & 5 deletions trunk/fs/xfs/xfs_bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -4153,16 +4153,21 @@ xfs_bmap_compute_maxlevels(
* number of leaf entries, is controlled by the type of di_nextents
* (a signed 32-bit number, xfs_extnum_t), or by di_anextents
* (a signed 16-bit number, xfs_aextnum_t).
*
* Note that we can no longer assume that if we are in ATTR1 that
* the fork offset of all the inodes will be (m_attroffset >> 3)
* because we could have mounted with ATTR2 and then mounted back
* with ATTR1, keeping the di_forkoff's fixed but probably at
* various positions. Therefore, for both ATTR1 and ATTR2
* we have to assume the worst case scenario of a minimum size
* available.
*/
if (whichfork == XFS_DATA_FORK) {
maxleafents = MAXEXTNUM;
sz = (mp->m_flags & XFS_MOUNT_ATTR2) ?
XFS_BMDR_SPACE_CALC(MINDBTPTRS) : mp->m_attroffset;
sz = XFS_BMDR_SPACE_CALC(MINDBTPTRS);
} else {
maxleafents = MAXAEXTNUM;
sz = (mp->m_flags & XFS_MOUNT_ATTR2) ?
XFS_BMDR_SPACE_CALC(MINABTPTRS) :
mp->m_sb.sb_inodesize - mp->m_attroffset;
sz = XFS_BMDR_SPACE_CALC(MINABTPTRS);
}
maxrootrecs = (int)XFS_BTREE_BLOCK_MAXRECS(sz, xfs_bmdr, 0);
minleafrecs = mp->m_bmap_dmnr[0];
Expand Down

0 comments on commit 67706fa

Please sign in to comment.