[Devel] [PATCH RHEL7 COMMIT] ve/fs/fcntl: allow pipes with O_DIRECT regardless "odirect_enable" status

Konstantin Khorenko khorenko at virtuozzo.com
Thu Jan 14 08:09:19 PST 2016


JFYI: i've dropped the patch.

     First of all - patch is buggy,
     second - packed pipes are still not used and may be buggy =>
     let it be as is, meant - disabled by default.

--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team

On 01/14/2016 04:46 PM, Konstantin Khorenko wrote:
> The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.9.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
> after rh7-3.10.0-229.7.2.vz7.9.20
> ------>
> commit e040b001d2f532d17e2121bad184f987e84561a6
> Author: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
> Date:   Thu Jan 14 17:46:03 2016 +0400
>
>      ve/fs/fcntl: allow pipes with O_DIRECT regardless "odirect_enable" status
>
>      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