From patchwork Fri Jan 12 14:11:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10160989 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 70FB3602A7 for ; Fri, 12 Jan 2018 14:10:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EA2F28735 for ; Fri, 12 Jan 2018 14:10:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 536B7288CA; Fri, 12 Jan 2018 14:10:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE36328735 for ; Fri, 12 Jan 2018 14:10:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933957AbeALOKh (ORCPT ); Fri, 12 Jan 2018 09:10:37 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37170 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933767AbeALOKd (ORCPT ); Fri, 12 Jan 2018 09:10:33 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0CEA6CJ098882 for ; Fri, 12 Jan 2018 09:10:33 -0500 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fexbd0y11-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 12 Jan 2018 09:10:32 -0500 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 12 Jan 2018 07:10:31 -0700 Received: from b03cxnp08026.gho.boulder.ibm.com (9.17.130.18) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 12 Jan 2018 07:10:28 -0700 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w0CEASsq12583186; Fri, 12 Jan 2018 07:10:28 -0700 Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5E3EAC604F; Fri, 12 Jan 2018 07:10:28 -0700 (MST) Received: from localhost.localdomain.com (unknown [9.85.71.89]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP id C0C7CC6037; Fri, 12 Jan 2018 07:10:26 -0700 (MST) From: Chandan Rajendra To: linux-ext4@vger.kernel.org Cc: Chandan Rajendra , linux-fsdevel@vger.kernel.org, tytso@mit.edu Subject: [RFC PATCH 2/8] fs/buffer.c: make some functions non-static Date: Fri, 12 Jan 2018 19:41:23 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180112141129.27507-1-chandan@linux.vnet.ibm.com> References: <20180112141129.27507-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18011214-0020-0000-0000-00000D4B1C9B X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008365; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000245; SDB=6.00973954; UDB=6.00493542; IPR=6.00753899; BA=6.00005775; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00019001; XFM=3.00000015; UTC=2018-01-12 14:10:30 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18011214-0021-0000-0000-00005FA986F8 Message-Id: <20180112141129.27507-3-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-01-12_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801120194 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The functions end_buffer_async_read(), block_size_bits() and create_page_buffers() will be needed by ext4 to implement encryption for blocksize < pagesize scenario. Signed-off-by: Chandan Rajendra --- fs/buffer.c | 6 +++--- include/linux/buffer_head.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 551b781..4360250 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -256,7 +256,7 @@ __find_get_block_slow(struct block_device *bdev, sector_t block) * I/O completion handler for block_read_full_page() - pages * which come unlocked at the end of I/O. */ -static void end_buffer_async_read(struct buffer_head *bh, int uptodate) +void end_buffer_async_read(struct buffer_head *bh, int uptodate) { unsigned long flags; struct buffer_head *first; @@ -1642,12 +1642,12 @@ EXPORT_SYMBOL(clean_bdev_aliases); * constraints in mind (relevant mostly if some * architecture has a slow bit-scan instruction) */ -static inline int block_size_bits(unsigned int blocksize) +int block_size_bits(unsigned int blocksize) { return ilog2(blocksize); } -static struct buffer_head *create_page_buffers(struct page *page, struct inode *inode, unsigned int b_state) +struct buffer_head *create_page_buffers(struct page *page, struct inode *inode, unsigned int b_state) { BUG_ON(!PageLocked(page)); diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index f1aed01..c26d16c 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -159,9 +159,13 @@ void set_bh_page(struct buffer_head *bh, int try_to_free_buffers(struct page *); struct buffer_head *alloc_page_buffers(struct page *page, unsigned long size, bool retry); +int block_size_bits(unsigned int blocksize); void create_empty_buffers(struct page *, unsigned long, unsigned long b_state); +struct buffer_head *create_page_buffers(struct page *page, struct inode *inode, + unsigned int b_state); void end_buffer_read_sync(struct buffer_head *bh, int uptodate); +void end_buffer_async_read(struct buffer_head *bh, int uptodate); void end_buffer_write_sync(struct buffer_head *bh, int uptodate); void end_buffer_async_write(struct buffer_head *bh, int uptodate);