[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AANLkTilGP6lF61zuG8L6u54g1R2YItrx6df3RWfxvCqf@mail.gmail.com>
Date: Sun, 30 May 2010 11:25:19 +0800
From: Changli Gao <xiaosuo@...il.com>
To: rostedt@...dmis.org
Cc: Miklos Szeredi <miklos@...redi.hu>, axboe@...nel.dk,
Al Viro <viro@...iv.linux.org.uk>, mszeredi@...e.cz,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Eric Dumazet <eric.dumazet@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v2 3/4]: sendfile: remove flags paramter of
do_splice_direct()
On Sun, May 30, 2010 at 8:39 AM, Steven Rostedt <rostedt@...dmis.org> wrote:
> Probably because I copied the code from something that used
> SPLICE_F_NONBLOCK ;-)
>
>From the relay API implementation?
> But userspace passes that flag too. Although, maybe I just don't
> understand the API fully.
>
this flag is a little confusing. It is much like:
flags = fcntl(pipe_fd, F_GETFL);
fcntl(pipe_fd, F_SETFL, flags | O_NONBLOCK);
splice(..pipe_fd..., 0); // without O_NONBLOCK
fcntl(pipe_fd, F_SETFL, falgs);
In fact, setting O_NONBLOCK is the only way of letting splice pipe
operations non-blockable currently. When splicing, splice doesn't
refer to the pipe file's f_flags. :(
--
Regards,
Changli Gao(xiaosuo@...il.com)
--
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