linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Used space in bytes
@ 2000-11-09 19:31 Petr Vandrovec
  2000-11-14 17:39 ` Jan Kara
  0 siblings, 1 reply; 8+ messages in thread
From: Petr Vandrovec @ 2000-11-09 19:31 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-fsdevel, linux-kernel

On  9 Nov 00 at 19:18, Jan Kara wrote:
> used (I tried to contact Ulrich Drepper <drepper@redhat.com> 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.

Or at least add some parameter to stat so that filesystem can say which
informations are important for you. But I think that ioctl is less
ugly. But that's just my opinion and I know that others here are strongly
against ioctl.
                                           Best regards,
                                                        Petr Vandrovec
                                                        vandrove@vc.cvut.cz

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Used space in bytes
  2000-11-09 19:31 Used space in bytes Petr Vandrovec
@ 2000-11-14 17:39 ` Jan Kara
  2000-11-14 19:31   ` [Off topic] UK patent office wants comments on software patent laws Lars Gaarden
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kara @ 2000-11-14 17:39 UTC (permalink / raw)
  To: Petr Vandrovec; +Cc: Jan Kara, linux-fsdevel, linux-kernel

  Hello.

> On  9 Nov 00 at 19:18, Jan Kara wrote:
> > used (I tried to contact Ulrich Drepper <drepper@redhat.com> 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.
  And how do you fill in st_blocks field?

							Honza

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Off topic] UK patent office wants comments on software patent laws.
  2000-11-14 17:39 ` Jan Kara
@ 2000-11-14 19:31   ` Lars Gaarden
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Gaarden @ 2000-11-14 19:31 UTC (permalink / raw)
  To: linux-kernel

Off topic for lkml, I know. But since software
patents could have a huge impact on open source,
UK residents on this list should be aware that
the UK patent office is currently asking for
comments on changes to the patent law regarding
software and business patents.

>From their page:

"Should Patents be Granted for Computer Software or
Ways of Doing Business?"

"We want to know what you think about this so that
Government policy is evidence-based and relevant to
business, commerce, and consumers - in other words
to you. So, whether you are in the software industry,
financial services, are a software user, a consumer,
or are otherwise interested, we want to hear from you."

http://www.patent.gov.uk/snews/notices/softcons.html
news://discuss.patent.gov.uk/patentoffice.softpat

-- 
LarsG
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Used space in bytes
@ 2000-11-14 18:55 Petr Vandrovec
  2000-11-14 18:25 ` Jan Kara
  0 siblings, 1 reply; 8+ messages in thread
From: Petr Vandrovec @ 2000-11-14 18:55 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-fsdevel, linux-kernel

On 14 Nov 00 at 18:39, Jan Kara wrote:
>   Hello.
> 
> > On  9 Nov 00 at 19:18, Jan Kara wrote:
> > > used (I tried to contact Ulrich Drepper <drepper@redhat.com> 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.
>   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
                                                      vandrove@vc.cvut.cz
                                                      
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Used space in bytes
  2000-11-14 18:55 Used space in bytes Petr Vandrovec
@ 2000-11-14 18:25 ` Jan Kara
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Kara @ 2000-11-14 18:25 UTC (permalink / raw)
  To: Petr Vandrovec; +Cc: linux-kernel, linux-fsdevel

> On 14 Nov 00 at 18:39, Jan Kara wrote:
> >   Hello.
> > 
> > > On  9 Nov 00 at 19:18, Jan Kara wrote:
> > > > used (I tried to contact Ulrich Drepper <drepper@redhat.com> 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.
> >   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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Used space in bytes
  2000-11-09 20:39 ` H. Peter Anvin
@ 2000-11-09 21:03   ` Miquel van Smoorenburg
  0 siblings, 0 replies; 8+ messages in thread
From: Miquel van Smoorenburg @ 2000-11-09 21:03 UTC (permalink / raw)
  To: linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 773 bytes --]

In article <8uf21i$ro7$1@cesium.transmeta.com>,
H. Peter Anvin <hpa@zytor.com> wrote:
>Report a block size (really allocation unit size) st_blocks == 1?

If you mean st_blksize, well:

       The value st_blocks gives the size of the file in 512-byte
       blocks.  The value st_blksize gives the "preferred" block­
       size for efficient file system I/O.  (Writing to a file in
       smaller  chunks  may  cause  an  inefficient  read-modify-
       rewrite.)

Telling programs 'please use 1-byte r/w buffers' is probably
a bad idea.

Mike.
-- 
People get the operating system they deserve.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Used space in bytes
  2000-11-09 18:18 Jan Kara
@ 2000-11-09 20:39 ` H. Peter Anvin
  2000-11-09 21:03   ` Miquel van Smoorenburg
  0 siblings, 1 reply; 8+ messages in thread
From: H. Peter Anvin @ 2000-11-09 20:39 UTC (permalink / raw)
  To: linux-kernel

Followup to:  <20001109191843.B11373@atrey.karlin.mff.cuni.cz>
By author:    Jan Kara <jack@suse.cz>
In newsgroup: linux.dev.kernel
>
>   Hello.
> 
>   I sent similar email a few weeks ago but discussion ended without
> any useful results if I rememeber well.
> 
>   Quota in reiserfs is (and needs to be) accounted in bytes not in blocks.
> I modified quota system to allow such thing so in kernel there's no
> problem. But also 'quotacheck' needs to know how many space does given
> file use. Currently it uses st_blocks from stat(2) to compute the space
> used but for reiserfs we need precision in bytes, not in 512 byte blocks...
> My proposal is to alter stat64() syscall to return also number of bytes
> used (I tried to contact Ulrich Drepper <drepper@redhat.com> 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
> 

Report a block size (really allocation unit size) st_blocks == 1?

	-hpa
-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Used space in bytes
@ 2000-11-09 18:18 Jan Kara
  2000-11-09 20:39 ` H. Peter Anvin
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kara @ 2000-11-09 18:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-fsdevel

  Hello.

  I sent similar email a few weeks ago but discussion ended without
any useful results if I rememeber well.

  Quota in reiserfs is (and needs to be) accounted in bytes not in blocks.
I modified quota system to allow such thing so in kernel there's no
problem. But also 'quotacheck' needs to know how many space does given
file use. Currently it uses st_blocks from stat(2) to compute the space
used but for reiserfs we need precision in bytes, not in 512 byte blocks...
My proposal is to alter stat64() syscall to return also number of bytes
used (I tried to contact Ulrich Drepper <drepper@redhat.com> 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

						Bye

							Honza
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2000-11-14 20:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-09 19:31 Used space in bytes Petr Vandrovec
2000-11-14 17:39 ` Jan Kara
2000-11-14 19:31   ` [Off topic] UK patent office wants comments on software patent laws Lars Gaarden
  -- strict thread matches above, loose matches on Subject: below --
2000-11-14 18:55 Used space in bytes Petr Vandrovec
2000-11-14 18:25 ` Jan Kara
2000-11-09 18:18 Jan Kara
2000-11-09 20:39 ` H. Peter Anvin
2000-11-09 21:03   ` Miquel van Smoorenburg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).