* [Ocfs2-devel] ocfs2's bmap output
@ 2005-10-14 0:33 Shaya Potter
2005-10-14 1:12 ` Mark Fasheh
2005-10-14 3:51 ` Joel Becker
0 siblings, 2 replies; 6+ messages in thread
From: Shaya Potter @ 2005-10-14 0:33 UTC (permalink / raw)
To: ocfs2-devel
I'm writing a stackable file system and one of it's features is that it
can combine many sparse files into a single view. On ext2/3 I was using
bmap to give me the information needed, so for instance, if I created a
big sparse file and tacked on some information at the end on ext2/3 I'd
get something like
blade12:~# ~/a.out abc
File: abc Size: 30002 Blocks: 8 Blocksize: 4096
0 0
1 0
2 0
3 0
4 0
5 0
6 0
7 833699
where my test program basically calls bmap (or in this case as it's from
userspace, it calls the FIBMAP ioctl) on each block of the file.
however, when I run it on OCFS2, I get.
blade12:/san/lc2# ~/a.out abc
File: abc Size: 30002 Blocks: 8 Blocksize: 4096
0 5700288
1 5700289
2 5700290
3 5700291
4 5700292
5 5700293
6 5700294
7 5700295
I'm guessing this is because of its use of extents, and probably means
I've screwed myself in trying to use bmap in this way. Is that a
correct assumption? Is there any other interface into OCFS2 to tell if
a block is a "blank" sparse area?
thanks,
shaya
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Ocfs2-devel] ocfs2's bmap output
2005-10-14 0:33 [Ocfs2-devel] ocfs2's bmap output Shaya Potter
@ 2005-10-14 1:12 ` Mark Fasheh
2005-10-14 1:18 ` Shaya Potter
2005-10-14 10:48 ` Shaya Potter
2005-10-14 3:51 ` Joel Becker
1 sibling, 2 replies; 6+ messages in thread
From: Mark Fasheh @ 2005-10-14 1:12 UTC (permalink / raw)
To: ocfs2-devel
Hi,
On Fri, Oct 14, 2005 at 01:33:35AM -0400, Shaya Potter wrote:
> I'm guessing this is because of its use of extents, and probably means
> I've screwed myself in trying to use bmap in this way. Is that a
> correct assumption? Is there any other interface into OCFS2 to tell if
> a block is a "blank" sparse area?
Unfortunately, no. Since OCFS2 doesn't currently support sparse files, the
"holes" created are actually allocated and filled with zeros. Once
allocated, they'll look no different from other file data.
I suppose you could read back those clusters in a file to see if they have
zero's, though that might not be particularly performant. Also, it would be
impossible to differentiate between a block that was zero'd as part of
a process file write versus a block which was zero'd as a hole.
--Mark
--
Mark Fasheh
Senior Software Developer, Oracle
mark.fasheh@oracle.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Ocfs2-devel] ocfs2's bmap output
2005-10-14 1:12 ` Mark Fasheh
@ 2005-10-14 1:18 ` Shaya Potter
2005-10-14 10:48 ` Shaya Potter
1 sibling, 0 replies; 6+ messages in thread
From: Shaya Potter @ 2005-10-14 1:18 UTC (permalink / raw)
To: ocfs2-devel
On Thu, 2005-10-13 at 23:12 -0700, Mark Fasheh wrote:
> Hi,
>
> On Fri, Oct 14, 2005 at 01:33:35AM -0400, Shaya Potter wrote:
> > I'm guessing this is because of its use of extents, and probably means
> > I've screwed myself in trying to use bmap in this way. Is that a
> > correct assumption? Is there any other interface into OCFS2 to tell if
> > a block is a "blank" sparse area?
> Unfortunately, no. Since OCFS2 doesn't currently support sparse files, the
> "holes" created are actually allocated and filled with zeros. Once
> allocated, they'll look no different from other file data.
>
> I suppose you could read back those clusters in a file to see if they have
> zero's, though that might not be particularly performant. Also, it would be
> impossible to differentiate between a block that was zero'd as part of
> a process file write versus a block which was zero'd as a hole.
or, I could make a bitmap file (on page boundary as that's what readpage
cares about), but my experience is that this is performant either.
thanks for the quick response.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Ocfs2-devel] ocfs2's bmap output
2005-10-14 0:33 [Ocfs2-devel] ocfs2's bmap output Shaya Potter
2005-10-14 1:12 ` Mark Fasheh
@ 2005-10-14 3:51 ` Joel Becker
1 sibling, 0 replies; 6+ messages in thread
From: Joel Becker @ 2005-10-14 3:51 UTC (permalink / raw)
To: ocfs2-devel
On Fri, Oct 14, 2005 at 01:33:35AM -0400, Shaya Potter wrote:
> I'm guessing this is because of its use of extents, and probably means
> I've screwed myself in trying to use bmap in this way. Is that a
> correct assumption? Is there any other interface into OCFS2 to tell if
> a block is a "blank" sparse area?
OCFS2 does not support sparse files at this time. So you'll
never find any holes, just allocated space.
Joel
--
Life's Little Instruction Book #451
"Don't be afraid to say, 'I'm sorry.'"
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Ocfs2-devel] ocfs2's bmap output
2005-10-14 1:12 ` Mark Fasheh
2005-10-14 1:18 ` Shaya Potter
@ 2005-10-14 10:48 ` Shaya Potter
2005-10-14 16:31 ` Sunil Mushran
1 sibling, 1 reply; 6+ messages in thread
From: Shaya Potter @ 2005-10-14 10:48 UTC (permalink / raw)
To: ocfs2-devel
On Thu, 2005-10-13 at 23:12 -0700, Mark Fasheh wrote:
> Hi,
>
> On Fri, Oct 14, 2005 at 01:33:35AM -0400, Shaya Potter wrote:
> > I'm guessing this is because of its use of extents, and probably means
> > I've screwed myself in trying to use bmap in this way. Is that a
> > correct assumption? Is there any other interface into OCFS2 to tell if
> > a block is a "blank" sparse area?
> Unfortunately, no. Since OCFS2 doesn't currently support sparse files, the
> "holes" created are actually allocated and filled with zeros. Once
> allocated, they'll look no different from other file data.
a related question then. Is sparse file support not planned at all for
OCFS2, or just "not currently" supported.
thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Ocfs2-devel] ocfs2's bmap output
2005-10-14 10:48 ` Shaya Potter
@ 2005-10-14 16:31 ` Sunil Mushran
0 siblings, 0 replies; 6+ messages in thread
From: Sunil Mushran @ 2005-10-14 16:31 UTC (permalink / raw)
To: ocfs2-devel
Not high in the priority... but it's on the list.
Shaya Potter wrote:
>On Thu, 2005-10-13 at 23:12 -0700, Mark Fasheh wrote:
>
>
>>Hi,
>>
>>On Fri, Oct 14, 2005 at 01:33:35AM -0400, Shaya Potter wrote:
>>
>>
>>>I'm guessing this is because of its use of extents, and probably means
>>>I've screwed myself in trying to use bmap in this way. Is that a
>>>correct assumption? Is there any other interface into OCFS2 to tell if
>>>a block is a "blank" sparse area?
>>>
>>>
>>Unfortunately, no. Since OCFS2 doesn't currently support sparse files, the
>>"holes" created are actually allocated and filled with zeros. Once
>>allocated, they'll look no different from other file data.
>>
>>
>
>a related question then. Is sparse file support not planned at all for
>OCFS2, or just "not currently" supported.
>
>thanks.
>
>_______________________________________________
>Ocfs2-devel mailing list
>Ocfs2-devel@oss.oracle.com
>http://oss.oracle.com/mailman/listinfo/ocfs2-devel
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-10-14 16:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-14 0:33 [Ocfs2-devel] ocfs2's bmap output Shaya Potter
2005-10-14 1:12 ` Mark Fasheh
2005-10-14 1:18 ` Shaya Potter
2005-10-14 10:48 ` Shaya Potter
2005-10-14 16:31 ` Sunil Mushran
2005-10-14 3:51 ` Joel Becker
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.