#23 size limitations in write() calls

open
nobody
None
8
2003-03-28
2003-03-28
Dominik Vogt
No

The ogfs_write() function limits the amount of data
that can be written in a single call. Said function
never spreads data over more than one resource group.
So, only as much data as fits in the rg with the most
space left can be written in one call.

To reproduce the problem, try this:

Assuming you have an empty ogfs with x MB free space
and y = x/4. Then run

$ dd if=/dev/zero of=foo bs=yM

The resulting file will be 0 bytes because y MB fit in
no single rg (there are always at least 10 rgs). Now try

$ dd if=/dev/zero of=foo bs=512

and the file system is filled up completely.

Discussion