9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] max file size in an fs
@ 2002-02-06  2:18 Russ Cox
  0 siblings, 0 replies; 5+ messages in thread
From: Russ Cox @ 2002-02-06  2:18 UTC (permalink / raw)
  To: 9fans

isn't the file server block size hard
coded into the kernel?  look at the
sources for the kernel you are booting.

grep RBUFSIZE /sys/src/fs/yourkernel/dat.h



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

* Re: [9fans] max file size in an fs
@ 2002-02-06  2:16 anothy
  0 siblings, 0 replies; 5+ messages in thread
From: anothy @ 2002-02-06  2:16 UTC (permalink / raw)
  To: 9fans

thanks russ, but i mean a dedicated file
server. no /dev/sd* to look at...

nice method for kfs, though... i'd been
doing the division with what kfs check
and ls -l gave me. yours is much faster.
ア



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

* Re: [9fans] max file size in an fs
@ 2002-02-06  1:43 Russ Cox
  0 siblings, 0 replies; 5+ messages in thread
From: Russ Cox @ 2002-02-06  1:43 UTC (permalink / raw)
  To: 9fans

> any way to get the block size of a running file server

	fs=/dev/sdC0/fs
	blksz=`{xd -c $fs |grep 110 |sed 1q |
		sed 's/^.......   (.)  (.)  (.)  (.).*/\1\2\3\4/'}



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

* Re: [9fans] max file size in an fs
@ 2002-02-06  0:56 geoff
  0 siblings, 0 replies; 5+ messages in thread
From: geoff @ 2002-02-06  0:56 UTC (permalink / raw)
  To: 9fans

For kfs and the standalone file server, you have to subtract 8 bytes
for the block tag from the blocksize first:

	iba = (blocksize - 8)/sizeof(ulong)

then 6+iba+iba⁲ yields the maximum number of addressible blocks in a
single file, so multiple by (blocksize - 8) to get maximum bytes.

The maximum size of a single file on such a file server can't exceed
2⁳ⁱ-1 bytes either.

One way to derive block size is run a check and divide the size of the
partition or disk holding the file system by the number of total
blocks reported by check.  The result will be off by epsilon since
there are a few blocks of overhead at the start of the file system.



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

* [9fans] max file size in an fs
@ 2002-02-06  0:26 anothy
  0 siblings, 0 replies; 5+ messages in thread
From: anothy @ 2002-02-06  0:26 UTC (permalink / raw)
  To: 9fans

is the max file size for a file on a plan 9 file server
the same as for a kfs file system with the same
block size? that is, does the guide below still apply?
	6 + iba + iba*iba
	iba = blocksize/sizeof(ulong)
also, any way to get the block size of a running file
server? i _think_ i remember what i built this one
with, but i'm not sure.
ア



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

end of thread, other threads:[~2002-02-06  2:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-06  2:18 [9fans] max file size in an fs Russ Cox
  -- strict thread matches above, loose matches on Subject: below --
2002-02-06  2:16 anothy
2002-02-06  1:43 Russ Cox
2002-02-06  0:56 geoff
2002-02-06  0:26 anothy

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).