From: Jeffrey Mahoney <jeffm@suse.com>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: "Kathy KN (HK)" <kathy.kn@gmail.com>,
Bryan Henderson <hbryan@us.ibm.com>,
linux-fsdevel@vger.kernel.org
Subject: Re: Access content of file via inodes
Date: Wed, 06 Apr 2005 09:09:57 -0400 [thread overview]
Message-ID: <4253DFA5.6000705@suse.com> (raw)
In-Reply-To: <1112787226.21605.27.camel@imp.csi.cam.ac.uk>
Anton Altaparmakov wrote:
> Jeff Mahoney wrote:
>
>>Kathy KN (HK) wrote:
>>
>>>What I meant by via blocks is to gain knowledge of the physical
>>>blocks used by the inodes and retrieve the content from it directly,
>>>by accessing b_data.
>>
>>The problem with that approach is that some filesystems may store part
>>of the file outside of a complete block. For example, reiserfs "tails"
>>will respond with -ENOENT on ->bmap. For files smaller than 16k, they
>>are quite common.
>
>
> This is one not true and two wrong!
>
> Looking at reiserfs code in the current 2.6 kernel it does:
[...]
> This will result in sparse blocks being returned whenever an error
> occurs. Not what is desired...
>
> <rant>
> The problem with ->bmap is that it cannot return error at all. It
> either returns 0 for sparse or >0 for real block. ->bmap is the most
> stupid interface I have ever seen... )-: If you ask me it should be
> removed from the kernel without notice. Let all applications that use
> it break. Who cares... It can always be replaced with a sensible
> interface that returns errors like -ESPARSE, -ENOTAPPLICABLE, -EIO,
> -ENOMEM, etc and doesn't assume that 0 is sparse...
> </rant>
Ugh. Mea culpa. I knew reiserfs_bmap would return less than useful
results, and stopped there. I should have dug a little deeper.
-Jeff
--
Jeff Mahoney
SuSE Labs
jeffm@suse.com
next prev parent reply other threads:[~2005-04-06 13:09 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 [this message]
2005-04-07 5:25 ` Kathy KN (HK)
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=4253DFA5.6000705@suse.com \
--to=jeffm@suse.com \
--cc=aia21@cam.ac.uk \
--cc=hbryan@us.ibm.com \
--cc=kathy.kn@gmail.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.