Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1890358/?format=api
{ "id": 1890358, "url": "http://patchwork.ozlabs.org/api/patches/1890358/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/20240124175302.1750912-14-willy@infradead.org/", "project": { "id": 3, "url": "http://patchwork.ozlabs.org/api/projects/3/?format=api", "name": "Linux MTD development", "link_name": "linux-mtd", "list_id": "linux-mtd.lists.infradead.org", "list_email": "linux-mtd@lists.infradead.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20240124175302.1750912-14-willy@infradead.org>", "list_archive_url": null, "date": "2024-01-24T17:52:56", "name": "[v2,13/15] ubifs: Pass a folio into ubifs_bulk_read() and ubifs_do_bulk_read()", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "e3611513b3615e6cdbf5ed8237544c9c00bf8345", "submitter": { "id": 70855, "url": "http://patchwork.ozlabs.org/api/people/70855/?format=api", "name": "Matthew Wilcox", "email": "willy@infradead.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/20240124175302.1750912-14-willy@infradead.org/mbox/", "series": [ { "id": 391975, "url": "http://patchwork.ozlabs.org/api/series/391975/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/list/?series=391975", "date": "2024-01-24T17:52:56", "name": "ubifs folio conversion", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/391975/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1890358/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1890358/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=vQdWIbMT;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256\n header.s=casper.20170209 header.b=CXDb07Vr;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4TKs5H4KVYz23f0\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 25 Jan 2024 04:53:39 +1100 (AEDT)", "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux))\n\tid 1rShR7-004Zt6-1g;\n\tWed, 24 Jan 2024 17:53:17 +0000", "from casper.infradead.org ([2001:8b0:10b:1236::1])\n\tby bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux))\n\tid 1rShR0-004Znv-2I\n\tfor linux-mtd@bombadil.infradead.org;\n\tWed, 24 Jan 2024 17:53:10 +0000", "from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red\n Hat Linux))\n\tid 1rShQv-00000007LVw-3gGu;\n\tWed, 24 Jan 2024 17:53:05 +0000" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=jLEZVxiU8KVaiD2hpF7v6WJHa7JWk7FOhv8mj8uC2gs=; b=vQdWIbMTRgq2TX\n\t9N/vX8dI/ZdKuu4XaXr+J7JP3PHLJtNtupUiU7WS9t9WRzRZmn97uZZm3fw3JaJmd4bDRZKFIqQA6\n\tgin9MCyOne8WK+gIh3I3byx5tRVpj7M+oSuuE6DqiOqCqstI6m/YLisZeicZZmWtdZ7CD73OsvDtN\n\tSJAtNqsyNYLs7BhbIRjTajnmrNL2ERoJow9kcSqXK9vOdQEgHl0OeolifJf8kO9pf8S8R8bfVR65M\n\t+mkWd8OAVLp77T0LaqDYYxyfMwqdOzyzZqdM5AShTxFHdZRT1nYcDFiADl7tXBaBNPRMQOstvWxXC\n\tLJ4w6RR8wV559rQY2wUg==;", "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version:\n\tReferences:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:\n\tContent-Type:Content-ID:Content-Description;\n\tbh=4uSPcgPGqp7gK3lPSg8vS+f9LEvj4oF12i+6rV8hq6A=; b=CXDb07VrQCb/5Y/cEm+JA2LhRO\n\tCiWTbLTz3WqXdOuT/5zAgdTGwoRJWcs18VCqY7j1hofPcRJ9Myu6oBsNtQr4TuQgjC5Zh65EbO1/v\n\tcoatwakTcR5FXjyCJE/MNRnsCA/q9i9R7ufqv21wIzPTOe2Pk50aH33EtRteRr+jK4L8Qo8iyk3ZV\n\tOukWDTu3cNT/YRPPBk9XJ4+Iu4o6aa+xPSbOjSvTjCvhGHOWd4tfOOFsf77vJsPV962SHZErSusVU\n\tbjkTEzvIRE3tP4uiKCivBXzb+H1rJvdZdh+s9dxXE5M59spMPrz2pjuyzKU7YSTRICBi1eJAv4HRt\n\tQGNC36/g==;" ], "From": "\"Matthew Wilcox (Oracle)\" <willy@infradead.org>", "To": "Richard Weinberger <richard@nod.at>", "Cc": "\"Matthew Wilcox (Oracle)\" <willy@infradead.org>,\n\tlinux-mtd@lists.infradead.org,\n\tZhihao Cheng <chengzhihao1@huawei.com>", "Subject": "[PATCH v2 13/15] ubifs: Pass a folio into ubifs_bulk_read() and\n ubifs_do_bulk_read()", "Date": "Wed, 24 Jan 2024 17:52:56 +0000", "Message-ID": "<20240124175302.1750912-14-willy@infradead.org>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20240124175302.1750912-1-willy@infradead.org>", "References": "<20240124175302.1750912-1-willy@infradead.org>", "MIME-Version": "1.0", "X-BeenThere": "linux-mtd@lists.infradead.org", "X-Mailman-Version": "2.1.34", "Precedence": "list", "List-Id": "Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>", "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-mtd>,\n <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>", "List-Archive": "<http://lists.infradead.org/pipermail/linux-mtd/>", "List-Post": "<mailto:linux-mtd@lists.infradead.org>", "List-Help": "<mailto:linux-mtd-request@lists.infradead.org?subject=help>", "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>", "Errors-To": "linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org" }, "content": "This saves a single call to compound_head().\n\nSigned-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>\nReviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>\n---\n fs/ubifs/file.c | 28 +++++++++++++---------------\n 1 file changed, 13 insertions(+), 15 deletions(-)", "diff": "diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c\nindex 9cd2e6d37c5d..f481fca7f53d 100644\n--- a/fs/ubifs/file.c\n+++ b/fs/ubifs/file.c\n@@ -703,15 +703,15 @@ static int populate_page(struct ubifs_info *c, struct page *page,\n * ubifs_do_bulk_read - do bulk-read.\n * @c: UBIFS file-system description object\n * @bu: bulk-read information\n- * @page1: first page to read\n+ * @folio1: first folio to read\n *\n * Returns: %1 if the bulk-read is done, otherwise %0 is returned.\n */\n static int ubifs_do_bulk_read(struct ubifs_info *c, struct bu_info *bu,\n-\t\t\t struct page *page1)\n+\t\t\t struct folio *folio1)\n {\n-\tpgoff_t offset = page1->index, end_index;\n-\tstruct address_space *mapping = page1->mapping;\n+\tpgoff_t offset = folio1->index, end_index;\n+\tstruct address_space *mapping = folio1->mapping;\n \tstruct inode *inode = mapping->host;\n \tstruct ubifs_inode *ui = ubifs_inode(inode);\n \tint err, page_idx, page_cnt, ret = 0, n = 0;\n@@ -761,11 +761,11 @@ static int ubifs_do_bulk_read(struct ubifs_info *c, struct bu_info *bu,\n \t\t\tgoto out_warn;\n \t}\n \n-\terr = populate_page(c, page1, bu, &n);\n+\terr = populate_page(c, &folio1->page, bu, &n);\n \tif (err)\n \t\tgoto out_warn;\n \n-\tunlock_page(page1);\n+\tfolio_unlock(folio1);\n \tret = 1;\n \n \tisize = i_size_read(inode);\n@@ -810,7 +810,7 @@ static int ubifs_do_bulk_read(struct ubifs_info *c, struct bu_info *bu,\n \n /**\n * ubifs_bulk_read - determine whether to bulk-read and, if so, do it.\n- * @page: page from which to start bulk-read.\n+ * @folio: folio from which to start bulk-read.\n *\n * Some flash media are capable of reading sequentially at faster rates. UBIFS\n * bulk-read facility is designed to take advantage of that, by reading in one\n@@ -819,12 +819,12 @@ static int ubifs_do_bulk_read(struct ubifs_info *c, struct bu_info *bu,\n *\n * Returns: %1 if a bulk-read is done and %0 otherwise.\n */\n-static int ubifs_bulk_read(struct page *page)\n+static int ubifs_bulk_read(struct folio *folio)\n {\n-\tstruct inode *inode = page->mapping->host;\n+\tstruct inode *inode = folio->mapping->host;\n \tstruct ubifs_info *c = inode->i_sb->s_fs_info;\n \tstruct ubifs_inode *ui = ubifs_inode(inode);\n-\tpgoff_t index = page->index, last_page_read = ui->last_page_read;\n+\tpgoff_t index = folio->index, last_page_read = ui->last_page_read;\n \tstruct bu_info *bu;\n \tint err = 0, allocated = 0;\n \n@@ -872,8 +872,8 @@ static int ubifs_bulk_read(struct page *page)\n \n \tbu->buf_len = c->max_bu_buf_len;\n \tdata_key_init(c, &bu->key, inode->i_ino,\n-\t\t page->index << UBIFS_BLOCKS_PER_PAGE_SHIFT);\n-\terr = ubifs_do_bulk_read(c, bu, page);\n+\t\t folio->index << UBIFS_BLOCKS_PER_PAGE_SHIFT);\n+\terr = ubifs_do_bulk_read(c, bu, folio);\n \n \tif (!allocated)\n \t\tmutex_unlock(&c->bu_mutex);\n@@ -887,9 +887,7 @@ static int ubifs_bulk_read(struct page *page)\n \n static int ubifs_read_folio(struct file *file, struct folio *folio)\n {\n-\tstruct page *page = &folio->page;\n-\n-\tif (ubifs_bulk_read(page))\n+\tif (ubifs_bulk_read(folio))\n \t\treturn 0;\n \tdo_readpage(folio);\n \tfolio_unlock(folio);\n", "prefixes": [ "v2", "13/15" ] }