Messages in this thread | ![/](/images/icornerl.gif) | | Subject | Re: stat64 for over 2TB file returned invalid st_blocks | From | Trond Myklebust <> | Date | Tue, 06 Dec 2005 19:59:44 -0500 |
| |
On Tue, 2005-12-06 at 14:24 -0700, Andreas Dilger wrote: > On Dec 06, 2005 09:48 -0500, Trond Myklebust wrote: > > On Tue, 2005-12-06 at 08:30 -0600, Dave Kleikamp wrote: > > > I think it looks good. The only issue I have is that I agree with > > > Andreas that i_blocks should be of type sector_t. I find the case of > > > accessing very large files over nfs with CONFIG_LBD disabled to be very > > > unlikely. > > > > NO! sector_t is a block-device specific type. It does not belong in the > > generic inode. > > sector_t would imply "units of 512-byte sectors", and this is exactly > what i_blocks is actually measuring, so I don't really understand your > objection.
Strictly speaking, sector_t is a block offset that happens to be in "units of 1<<inode->i_blkbits bytes". It is not a count of the number of blocks in a file.
> If you have objection to the use of sector_t, it could be some other type > that is defined virtually identically as CONFIG_LBD sector_t, except that > it might be desirable to allow it to be configured separately for network > filesystems that have large files. I'm sure the embedded linux folks > wouldn't be thrilled at an extra 4 bytes in every inode and 64-bit math > if they don't really use it.
That would be fine.
Cheers, Trond
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |