Skip to contentSkip to conversation

An nfs question ftruncate vs. pwrite

DISCUSSION Kenny Simpson 2 participants 2 messages Dec 7, 2005

lore
Share & tools
lore
#0 lore raw

When a file that is opened with normal flags (O_RDWR|O_CREAT|O_TRUNC|O_LARGEFILE) is on NFS, and it is exteded via ftruncate, the new expty pages get read back from the server before the system call returns:
(from strace -T):
ftruncate64(3, 41943040) = 0 <0.063866>

-Kenny

__________________________________________
Yahoo! DSL – Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com

#1 lore raw
Quoted 6 lines · Kenny Simpson

When a file that is opened with normal flags (O_RDWR|O_CREAT|O_TRUNC|O_LARGEFILE) is on NFS, and it is exteded via ftruncate, the new expty pages get read back from the server before the system call returns:
(from strace -T):
ftruncate64(3, 41943040) = 0 <0.063866>

Is there a question in there?

If the question is whether the new empty pages get read in from the server before the ftruncate system call returns, then no, they do not. They get read in from the server as required in the normal course of future operations.

Thanx...

ps