[Devel] [PATCH rh7] fcntl: allow pipes with O_DIRECT regardless "odirect_enable" status
Kirill Tkhai
ktkhai at odin.com
Wed Dec 16 04:18:49 PST 2015
On 15.12.2015 17:32, Stanislav Kinsburskiy wrote:
> This flag represents packetized mode for pipes, which only changes how pipe
> holds packets, and shouldn't be affected by "odirect_enable" toggle.
>
> Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Reviewed-by: Kirill Tkhai <ktkhai at virtuozzo.com>
> ---
> fs/fcntl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/fcntl.c b/fs/fcntl.c
> index cfa349c..1df1ffa 100644
> --- a/fs/fcntl.c
> +++ b/fs/fcntl.c
> @@ -70,7 +70,7 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
> struct inode * inode = file_inode(filp);
> int error = 0;
>
> - if (!may_use_odirect())
> + if (!S_ISFIFO(filp->f_mode) && !may_use_odirect(filp))
> arg &= ~O_DIRECT;
> if (ve_fsync_behavior() == FSYNC_NEVER)
> arg &= ~O_SYNC;
>
More information about the Devel
mailing list