ext2_find_near()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

Sorry to bother.
for ext2_find_near(), why we tro to find near block by tring priveous block? Why not forward?



static ext2_fsblk_t ext2_find_near(struct inode *inode, Indirect *ind)
{
    struct ext2_inode_info *ei = EXT2_I(inode);
    __le32 *start = ind->bh ? (__le32 *) ind->bh->b_data : ei->i_data;
    __le32 *p;
    ext2_fsblk_t bg_start;
    ext2_fsblk_t colour;

    /* Try to find previous block */
    for (p = ind->p - 1; p >= start; p--)
        if (*p)
            return le32_to_cpu(*p);

    /* No such thing, so let's try location of indirect block */
    if (ind->bh)
        return ind->bh->b_blocknr;





Thank you!
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux