From: Aleksei Besogonov <cyberax@amazon.com>
To: <linux-xfs@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>,
<darrick.wong@oracle.com>
Cc: Aleksei Besogonov <cyberax@amazon.com>
Subject: [PATCH 2/2] xfs: add support for iomap-based swapfile activation
Date: Tue, 1 May 2018 18:48:07 +0000 [thread overview]
Message-ID: <20180501184807.123111-3-cyberax@amazon.com> (raw)
In-Reply-To: <20180501184807.123111-1-cyberax@amazon.com>
Use iomap-based swapfile activation instead of the default
generic_swapfile_activate bmap-based infrastructure.
---
fs/xfs/xfs_aops.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 31f1f10eecd1..9c10efaabc6f 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -1491,6 +1491,13 @@ xfs_vm_set_page_dirty(
return newly_dirty;
}
+static int xfs_swap_activate(struct swap_info_struct *sis, struct file *swap_file,
+ sector_t *span)
+{
+ sis->bdev = xfs_find_bdev_for_inode(file_inode(swap_file));
+ return iomap_swap_activate(sis, swap_file, span, &xfs_iomap_ops);
+}
+
const struct address_space_operations xfs_address_space_operations = {
.readpage = xfs_vm_readpage,
.readpages = xfs_vm_readpages,
@@ -1504,4 +1511,5 @@ const struct address_space_operations xfs_address_space_operations = {
.migratepage = buffer_migrate_page,
.is_partially_uptodate = block_is_partially_uptodate,
.error_remove_page = generic_error_remove_page,
+ .swap_activate = xfs_swap_activate,
};
--
2.14.1
next prev parent reply other threads:[~2018-05-01 18:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-01 18:48 [PATCH 0/2] RFC: iomap-based swapfile activation Aleksei Besogonov
2018-05-01 18:48 ` [PATCH 1/2] fs: Add iomap_swap_activate Aleksei Besogonov
2018-05-01 20:44 ` kbuild test robot
2018-05-02 1:02 ` kbuild test robot
2018-05-01 18:48 ` Aleksei Besogonov [this message]
2018-05-01 19:16 ` [PATCH 0/2] RFC: iomap-based swapfile activation Eric Sandeen
-- strict thread matches above, loose matches on Subject: below --
2018-04-20 22:08 [PATCH 0/2] RFC: iomap-based swap file activation Aleksei Besogonov
2018-04-20 22:08 ` [PATCH 2/2] xfs: add support for iomap-based swapfile activation Aleksei Besogonov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180501184807.123111-3-cyberax@amazon.com \
--to=cyberax@amazon.com \
--cc=darrick.wong@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).