[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090910231816.GA27220@lst.de>
Date: Fri, 11 Sep 2009 01:18:16 +0200
From: Christoph Hellwig <hch@....de>
To: Andreas Dilger <adilger@....com>
Cc: Christoph Hellwig <hch@....de>, Jan Kara <jack@...e.cz>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
akpm@...ux-foundation.org, drepper@...hat.com,
viro@...iv.linux.org.uk, kyle@...artin.ca
Subject: Re: [PATCH 18/16] implement posix O_SYNC and O_DSYNC semantics
On Fri, Sep 11, 2009 at 01:07:55AM +0200, Andreas Dilger wrote:
> > + * Note: __O_SYNC must never be used directly.
>
> Doesn't it make sense that applications that actually know what they are
> doing may want to start using __O_SYNC directly at some point in the
> future? It makes sense to code the kernel to handle both of these flags
> appropriately (i.e. if __O_SYNC is set, but O_DSYNC is not then treat
> this as the proper "O_SYNC").
What would be the benefit of that? Setting two bits vs one in a data
structure is not going to make any difference, and the way it's done in
this patch is actually much easier to implement in the kernel.
> > Index: linux-2.6/arch/alpha/include/asm/fcntl.h
> > ===================================================================
> > --- linux-2.6.orig/arch/alpha/include/asm/fcntl.h 2009-09-10 16:31:47.720004025 -0300
> > +++ linux-2.6/arch/alpha/include/asm/fcntl.h 2009-09-10 16:33:55.087294444 -0300
> > #define O_CLOEXEC 010000000 /* set close_on_exec */
> > +#define __O_SYNC 010000000
>
> These two flags have the same value...
Thanks, corrected.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists