• Mark Fasheh's avatar
    ocfs2: allow return of new inode block location before allocation of the inode · e49e2767
    Mark Fasheh authored
    This allows code which needs to know the eventual block number of an inode
    but can't allocate it yet due to transaction or lock ordering. For example,
    ocfs2_create_inode_in_orphan() currently gives a junk blkno for preparation
    of the orphan dir because it can't yet know where the actual inode is placed
    - that code is actually in ocfs2_mknod_locked. This is a problem when the
    orphan dirs are indexed as the junk inode number will create an index entry
    which goes unused (and fails the later removal from the orphan dir).  Now
    with these interfaces, ocfs2_create_inode_in_orphan() can run the block
    group search (and get back the inode block number) *before* any actual
    allocation occurs.
    Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
    Signed-off-by: default avatarTao Ma <tao.ma@oracle.com>
    e49e2767
suballoc.h 7.08 KB