> > > > I dunno. Is this true of all linux filesystems in all cases? Maybe.
> > >
> > > Assuming one of them is not would you rather want to fix that file system
> > > or 10 zillion user programs (including the kernel core dumper) that
> > > get it wrong? @)
> > >
> >
> > I think that removing one bug is better than adding one.
> >
> > Many filesystems will return a short write if they hit a memory
> > allocation failure, for example. pipe_write() sure will. Retrying
> > is appropriate in such a case.
> Sorry but are you really suggesting every program in the world that uses
> write() anywhere should put it into a loop? That seems just like really
> bad API design to me, requiring such contortions in a fundamental
> system call just to work around kernel deficiencies.
> I can just imagine the programmers putting nasty comments
> about the Linux kernel on top of those loops and they would
> be fully deserved.

Hey, don't look at me - blame Brian Kernighan or George Bush or

背景: core dumpをパイプ経由で書き込むときに

static int dump_write(struct file *file, const void *addr, int nr)
return file->f_op->write(file, addr, nr, &file->f_pos) == nr;


Andi Kleen:

Paul Smith:
 うーん、でも多くのファイルシステムがメモリ不足やらなんやらで部分書き込み成功を返すんだよね。ここはcore dumpのところだけ直すのが影響範囲が小さくて・・・
Andi Kleen:

Andrew Morton:
 こっち見んな( ゚Д゚ )