kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* ext2_find_near()
@ 2012-11-14  3:44 Anders Lind
  2012-11-15  7:00 ` ext2_find_near() Abhijit Pawar
  0 siblings, 1 reply; 2+ messages in thread
From: Anders Lind @ 2012-11-14  3:44 UTC (permalink / raw)
  To: kernelnewbies

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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121113/8ef82d62/attachment.html 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-15  7:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-14  3:44 ext2_find_near() Anders Lind
2012-11-15  7:00 ` ext2_find_near() Abhijit Pawar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).