[sheepdog] [PATCH] sheep: open files with O_EXCL when creating objects

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Fri Sep 14 06:26:52 CEST 2012


At Fri, 14 Sep 2012 10:30:32 +0800,
Liu Yuan wrote:
> 
> On 09/13/2012 05:30 PM, MORITA Kazutaka wrote:
> > -		flags |= O_CREAT | O_TRUNC;
> > +		flags |= O_CREAT | O_EXCL;
> 
> why drop O_TRUNC?

Using O_TRUNC with O_EXCL doesn't make sense and I think we don't need
the flag at all.  This patch assumes that CREATE requests don't
overwrite objects with different content.  Is it wrong?

Thanks,

Kazutaka



More information about the sheepdog mailing list