• M
    ocfs2: abstract out allocation locking · abf8b156
    Mark Fasheh 提交于
    Right now, file allocation for ocfs2 is done within ocfs2_extend_file(),
    which is either called from ->setattr() (for an i_size change), or at the
    top of ocfs2_file_aio_write().
    
    Inodes on file systems with sparse file support will want to do their
    allocation during the actual write call.
    
    In either case the cluster locking decisions are the same. We abstract out
    that code into a new function, ocfs2_lock_allocators() which will be used by
    a later patch to enable writing to sparse files.
    
    This also provides a nice cleanup of ocfs2_extend_allocation().
    Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
    abf8b156
file.c 35.1 KB