| From | Subject | Date |
|---|---|---|
| Nicholas Miell | Re: [RFC][PATCH] Implement SEEK_HOLE/SEEK_DATA
Well, there's no demand specifically for SEEK_HOLE/SEEK_DATA[1] and the
interface is ugly, so killing it before it spreads beyond Solaris seems
like a good idea to me. OTOH, if you implement SEEK_HOLE/SEEK_DATA,
nobody is going to bother using the good interface if SEEK_HOLE/
SEEK_DATA is the only portable interface.
[1] The only user appears to be Joerg Schilling.
http://www.google.com/codesearch?hl=en&q=+%5CWSEEK_(DATA%7CHOLE)&sa=N&as_case=y
--
Nicholas Miell ...
| Nov 28, 4:50 pm 2007 |
| Josef Bacik | [RFC][PATCH] Implement SEEK_HOLE/SEEK_DATA
Hello,
This is my first pass at implementing SEEK_HOLE/SEEK_DATA. This has been in
solaris for about a year now, and is described here
http://docs.sun.com/app/docs/doc/819-2241/lseek-2?l=en&a=view&q=SEEK_HOLE
http://blogs.sun.com/roller/page/bonwick?entry=seek_hole_and_seek_data
I've added a file operation to allow filesystems to override the default
seek_hole_data function, which just loops through bmap looking for either a hole
or data. I've tested this and it seems to work well. I ran ...
| Nov 28, 1:02 pm 2007 |
| Nicholas Miell | Re: [RFC][PATCH] Implement SEEK_HOLE/SEEK_DATA
I stand by my belief that SEEK_HOLE/SEEK_DATA is a lousy interface.
It abuses the seek operation to become a query operation, it requires a
total number of system calls proportional to the number holes+data and
it isn't general enough for other similar uses (e.g. total number of
contiguous extents, compressed extents, offline extents, extents
currently shared with other inodes, extents embedded in the inode
(tails), etc.)
Something like the following would be much better:
int ...
| Nov 28, 3:56 pm 2007 |
| Josef Bacik | Re: [RFC][PATCH] Implement SEEK_HOLE/SEEK_DATA
Agreed, however in speaking hch and others the consensus was FIEMAP was good,
however there was no reason why SEEK_HOLE/SEEK_DATA shouldn't also be
implemented, and then at some point down the road when a generic FIEMAP is in
place either change the SEEK_HOLE/SEEK_DATA implementation to try to use FIEMAP
by default and then fall back on bmap if it has to, or some other such
operation. I'm cool with passing on this implementation in preference for
FIEMAP, but given the discussion I had earlier ...
| Nov 28, 4:33 pm 2007 |
| Jörn | Re: [RFC][PATCH] Implement SEEK_HOLE/SEEK_DATA
I didn't follow the discussion much, since it didn't appear to suit
logfs too well. In a nutshell, logfs is purely block-based, prepends
every block with a header, may compress blocks and packs them as tightly
as possible (byte alignment).
Maybe the "MAP" part fooled me to believe FIEMAP would also expose
physical location of extends on the medium. But reading the proposal
again, I am unsure about that part. If physical locations are exposed,
SEEK_HOLE/SEEK_DATA is significantly more ...
| Nov 28, 4:48 pm 2007 |
| Andreas Dilger | Re: [RFC][PATCH] Implement SEEK_HOLE/SEEK_DATA
This is what FIEMAP is supposed to do. We wrote a spec and implemented
a prototype for ext4, but haven't had time to make it generic to move
the large part of the code into the VFS. If someone wanted to take that
up, it would be much appreciated.
See "[RFC] add FIEMAP ioctl to efficiently map file allocation" in
linux-fsdevel for details on this interface.
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
-
| Nov 28, 4:39 pm 2007 |
| Josef Bacik | Re: [RFC][PATCH] Implement SEEK_HOLE/SEEK_DATA
Since it appears pathconf doesn't actually interface with the kernel I think
that its not really worth chasing down. I don't think every fs maintainer is
really going to want to chase down a glibc person in order to change what
This was my interpretation of the man page, however Joern looked at what solaris
Thanks much for your comments,
Josef
-
| Nov 28, 4:38 pm 2007 |
| Andreas Dilger | Re: [RFC][PATCH] Implement SEEK_HOLE/SEEK_DATA
The problem with this is that it doesn't know anything about the filesystem,
and might spin for ages in a tight loop for a large sparse or dense file.
Almost any fs would have to implement ->seek_hole_data() for this to be
useful, at which point we might as well just report -EINVAL to the
application or glibc (since this needs to be handled anyways).
Also, what about network filesystems that don't support bmap? They will
show up as entirely holes, since bmap() returns 0 if ->bmap is ...
| Nov 28, 4:49 pm 2007 |
| Brad Boyer | Re: [RFC][PATCH] Implement SEEK_HOLE/SEEK_DATA
I have a few comments. Some of them are inline with the code.
The one generic thing is that the Sun documentation specifically
says to check pathconf(_PC_MIN_HOLE_SIZE) on the filesystem to see
if it supports this request. Have you looked into adding this to
the Linux version of pathconf? I haven't tried to look at the latest
glibc, but 2.3.2 doesn't appear to have it. If we do have it, this
request should really go to the kernel to ask the individual
filesystem. However, it looks like ...
| Nov 28, 2:56 pm 2007 |
| Eric Paris | Re: [PATCH -v3] SELinux: Add get, set, and cloning of su ...
Any complaints or questions left here? I've got more people reporting
problems with NFS/SELinux and this is the first (and hardest) step to
making NFS and any genic LSM play nicely. If there are not any
problems how should this be pushed to linus? Through James Morris's
git tree? Through Chris Wright's LSM tree?
And I did get a:
Acked-by: Stephen D. Smalley <sds@tycho.nsa.gov>
Which I don't think ever appeared on all the lists for everyone interested.
-
| Nov 28, 10:04 am 2007 |
| previous day | today | next day |
|---|---|---|
| November 27, 2007 | November 28, 2007 | November 29, 2007 |
