This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH][BZ #12723] Fix pathconf and fpathconf on Linux
- From: Siddhesh Poyarekar <siddhesh dot poyarekar at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Siddhesh Poyarekar <siddhesh at redhat dot com>, libc-alpha at sourceware dot org
- Date: Fri, 1 Mar 2013 19:43:51 +0530
- Subject: Re: [PATCH][BZ #12723] Fix pathconf and fpathconf on Linux
- References: <20130301132337.GO2358@spoyarek.pnq.redhat.com><5130B64C.email@example.com>
On 1 March 2013 19:38, Florian Weimer <firstname.lastname@example.org> wrote:
> I think both the patch and the original code are wrong because Linux does
> not guarantee atomic delivery beyond PAGE_SIZE (at least that's how I read
> the code). So pathconf(_PC_PIPE_BUF) should return PAGE_SIZE
> F_SETPIPE_SZ increases the amount of data which can ideally be written
> without blocking, but not the size of atomically delivered chunks.
I had thought that too, but the pipe_write code seems to be synced
with a mutex_lock() on the inode, which is why I figured that the
writes may be atomic.