From patchwork Tue Dec 15 17:29:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Kinsburskiy X-Patchwork-Id: 7856131 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 58B8B9F349 for ; Tue, 15 Dec 2015 17:30:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8369620377 for ; Tue, 15 Dec 2015 17:30:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A80B02022D for ; Tue, 15 Dec 2015 17:30:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965431AbbLOR3H (ORCPT ); Tue, 15 Dec 2015 12:29:07 -0500 Received: from swsoft-msk-nat.sw.ru ([195.214.232.10]:46473 "EHLO sandbox" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965414AbbLOR3F (ORCPT ); Tue, 15 Dec 2015 12:29:05 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) by sandbox (8.14.8/8.14.8) with ESMTP id tBFHT12v016438; Tue, 15 Dec 2015 21:29:01 +0400 Subject: [PATCH RFC 1/3] pipe: make is_packetized() non-static and declare in pipe_fs_i.h From: Stanislav Kinsburskiy To: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org Cc: criu@openvz.org, skinsbursky@virtuozzo.com Date: Tue, 15 Dec 2015 21:29:01 +0400 Message-ID: <20151215172901.16355.80770.stgit@localhost.localdomain> In-Reply-To: <20151215172356.16355.29361.stgit@localhost.localdomain> References: <20151215172356.16355.29361.stgit@localhost.localdomain> User-Agent: StGit/0.17-dirty MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With introduction of packetized pipe mode, represented by O_DIRECT flag, splice stopped working correctly with a pipe in this mode. To be able to fix them, this helper have to exposed. Signed-off-by: Stanislav Kinsburskiy --- fs/pipe.c | 2 +- include/linux/pipe_fs_i.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/pipe.c b/fs/pipe.c index 42cf8dd..645d142 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -329,7 +329,7 @@ pipe_read(struct kiocb *iocb, struct iov_iter *to) return ret; } -static inline int is_packetized(struct file *file) +int is_packetized(struct file *file) { return (file->f_flags & O_DIRECT) != 0; } diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index eb8b8ac..9fdaf8f 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h @@ -146,4 +146,6 @@ struct pipe_inode_info *get_pipe_info(struct file *file); int create_pipe_files(struct file **, int); +int is_packetized(struct file *file); + #endif