Skip to contentSkip to conversation

Used space in bytes

DISCUSSION Petr Vandrovec 2 participants 2 messages Nov 14, 2000

lore
Share & tools
lore
#0 lore raw
Quoted 11 lines · Jan Kara

Hello.

Quoted 9 lines · Jan Kara
Quoted 7 lines

used (I tried to contact Ulrich Drepper <[email protected]> who should be right person to ask about such things (at least I was said so) but go no answer...). Does anybody have any better solution?
I know about two others - really ugly ones:
1) fs specific ioctl()
2) compute needed number of bytes from st_size and st_blocks, which is currently possible but won't be in future

Quoted 5 lines
Quoted 4 lines

If I may, please do not add it into stat/stat64 structure. On Netware, computing really used space can take eons because of it has to read allocation tables to memory to find size. It is usually about 500% slower than retrieving all other file informations.

And how do you fill in st_blocks field?

Currently as st_size / st_blksize. If I'll want to report real used size, so that quotas could be built on the top of Netware space restrictions, Netware is willing to return size in its allocation blocks after holes and compression takes place, but while computation time is afforable for open(), it is not for stat()ing thousands of entries in directories.
Best regards,
Petr Vandrovec [email protected]

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#1 lore raw
Quoted 16 lines · Jan Kara
Quoted 15 lines

Hello.

Quoted 13 lines · Jan Kara
Quoted 7 lines

used (I tried to contact Ulrich Drepper <[email protected]> who should be right person to ask about such things (at least I was said so) but go no answer...). Does anybody have any better solution?
I know about two others - really ugly ones:
1) fs specific ioctl()
2) compute needed number of bytes from st_size and st_blocks, which is currently possible but won't be in future

If I may, please do not add it into stat/stat64 structure. On Netware, computing really used space can take eons because of it has to read allocation tables to memory to find size. It is usually about 500% slower than retrieving all other file informations.

Quoted 7 lines
Quoted 1 line

And how do you fill in st_blocks field?

Currently as st_size / st_blksize. If I'll want to report real used size, so that quotas could be built on the top of Netware space restrictions, Netware is willing to return size in its allocation blocks after holes and compression takes place, but while computation time is afforable for open(), it is not for stat()ing thousands of entries in directories.

Hmm.. But that's problem as 'quotacheck' uses stat to get space used by
file... So it won't work on Netware anyway.

Honza

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/