From: "Kathy KN (HK)" <kathy.kn@gmail.com>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: Jeff Mahoney <jeffm@suse.com>,
Bryan Henderson <hbryan@us.ibm.com>,
linux-fsdevel@vger.kernel.org
Subject: Re: Access content of file via inodes
Date: Thu, 7 Apr 2005 13:25:08 +0800 [thread overview]
Message-ID: <f8ad67b305040622251465a93f@mail.gmail.com> (raw)
In-Reply-To: <1112787226.21605.27.camel@imp.csi.cam.ac.uk>
> Looking at reiserfs code in the current 2.6 kernel it does:
>
> .bmap = reiserfs_aop_bmap,
>
> Which is:
>
> static sector_t reiserfs_aop_bmap(struct address_space *as, sector_t
> block) {
> return generic_block_bmap(as, block, reiserfs_bmap) ;
> }
>
> And generic_block_bmap is:
>
> sector_t generic_block_bmap(struct address_space *mapping, sector_t
> block,
> get_block_t *get_block)
> {
> struct buffer_head tmp;
> struct inode *inode = mapping->host;
> tmp.b_state = 0;
> tmp.b_blocknr = 0;
> get_block(inode, block, &tmp, 0);
> return tmp.b_blocknr;
> }
>
> It ignores any errors from get_block() and always returns tmp.b_blocknr.
> Thus is get_block() fails, tmp.b_blocknr is 0 and hence 0 is returned,
> i.e. a sparse block. Which is complete rubbish...
>
> And get_block in this case in reiserfs is:
>
> static int reiserfs_bmap (struct inode * inode, sector_t block,
> struct buffer_head * bh_result, int create)
> {
> if (!file_capable (inode, block))
> return -EFBIG;
>
> reiserfs_write_lock(inode->i_sb);
> /* do not read the direct item */
> _get_block_create_0 (inode, block, bh_result, 0) ;
> reiserfs_write_unlock(inode->i_sb);
> return 0;
> }
Just wondering. Say, reiserfs/r4, how is it possible to access
the tail which contain the data of the file, since most of our
production boxes uses either reiserfs and/or reiser4.
Kathy
next prev parent reply other threads:[~2005-04-07 5:25 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-05 1:23 Access content of file via inodes Kathy KN
2005-04-05 7:22 ` Christoph Hellwig
2005-04-05 17:53 ` Bryan Henderson
2005-04-06 1:27 ` Kathy KN (HK)
2005-04-06 1:53 ` Jeff Mahoney
2005-04-06 17:57 ` Bryan Henderson
2005-04-06 7:54 ` Anton Altaparmakov
2005-04-06 11:33 ` Anton Altaparmakov
2005-04-06 13:09 ` Jeffrey Mahoney
2005-04-07 5:25 ` Kathy KN (HK) [this message]
2005-04-07 6:47 ` Jeffrey Mahoney
2005-04-07 8:09 ` Anton Altaparmakov
2005-04-05 19:01 ` Jeff Mahoney
2005-04-06 1:32 ` Kathy KN (HK)
2005-04-06 1:50 ` Jeff Mahoney
2005-04-08 6:01 ` Kathy KN (HK)
2005-04-08 8:17 ` Anton Altaparmakov
2005-05-27 19:13 ` Martin Jambor
2005-05-28 15:57 ` Anton Altaparmakov
2005-05-28 21:44 ` Martin Jambor
2005-05-29 7:26 ` Anton Altaparmakov
2005-05-30 21:51 ` Martin Jambor
2005-05-30 22:19 ` Anton Altaparmakov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f8ad67b305040622251465a93f@mail.gmail.com \
--to=kathy.kn@gmail.com \
--cc=aia21@cam.ac.uk \
--cc=hbryan@us.ibm.com \
--cc=jeffm@suse.com \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.