lkml.org 
[lkml]   [2000]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: nfsv3d wrong truncates over 4G
From
>>>>> Matti Aarnio <matti.aarnio@zmailer.org> writes:

> The NFSv3 SERVER (for which Andrea made his patch) actually
> MUST open local files with O_LARGEFILE flag set. (Otherwise
> e.g. EXT2 may reject the open.)

This should already be done IIRC. At least nfsd_open() always sets
O_LARGEFILE.

> The NFSv3 CLIENT code must do post-open verification, that if
> the opened file has size exceeding 2G-1, and O_LARGEFILE flag
> is not set, the opened file must be closed, and caller must be
> informed of the rejection with -EFBIG status. (If possible,
> do that size verification before open.)

The exact same code from ext2_open_file() should work fine in
nfs_open().

BTW: There seems to be a bug there: according to the LFS docs, on
http://ewe3.sas.com/standards/large.file/x_open.20Mar96.html
we should be returning EOVERFLOW rather than EBIG.

Cheers,
Trond
-
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/

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.147 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site