aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-12 16:50:21 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-12 16:50:21 -0500
commit6bec0035286119eefc32a5b1102127e6a4032cb2 (patch)
tree440fab001b4c877b0b0c9fd62d8392e956e387e3 /fs/ceph
parent5d8e7fb6916556e9b476de33404e8c9e2c9aee61 (diff)
parent15d0f5ea348b9c4e6d41df294dde38a56a39c7bf (diff)
Merge branch 'for-3.20/bdi' of git://git.kernel.dk/linux-block
Pull backing device changes from Jens Axboe: "This contains a cleanup of how the backing device is handled, in preparation for a rework of the life time rules. In this part, the most important change is to split the unrelated nommu mmap flags from it, but also removing a backing_dev_info pointer from the address_space (and inode), and a cleanup of other various minor bits. Christoph did all the work here, I just fixed an oops with pages that have a swap backing. Arnd fixed a missing export, and Oleg killed the lustre backing_dev_info from staging. Last patch was from Al, unexporting parts that are now no longer needed outside" * 'for-3.20/bdi' of git://git.kernel.dk/linux-block: Make super_blocks and sb_lock static mtd: export new mtd_mmap_capabilities fs: make inode_to_bdi() handle NULL inode staging/lustre/llite: get rid of backing_dev_info fs: remove default_backing_dev_info fs: don't reassign dirty inodes to default_backing_dev_info nfs: don't call bdi_unregister ceph: remove call to bdi_unregister fs: remove mapping->backing_dev_info fs: export inode_to_bdi and use it in favor of mapping->backing_dev_info nilfs2: set up s_bdi like the generic mount_bdev code block_dev: get bdev inode bdi directly from the block device block_dev: only write bdev inode on close fs: introduce f_op->mmap_capabilities for nommu mmap support fs: kill BDI_CAP_SWAP_BACKED fs: deduplicate noop_backing_dev_info
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/file.c2
-rw-r--r--fs/ceph/inode.c2
-rw-r--r--fs/ceph/super.c20
3 files changed, 8 insertions, 16 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index ce74b394b49d..905986dd4c3c 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -945,7 +945,7 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from)
945 mutex_lock(&inode->i_mutex); 945 mutex_lock(&inode->i_mutex);
946 946
947 /* We can write back this queue in page reclaim */ 947 /* We can write back this queue in page reclaim */
948 current->backing_dev_info = file->f_mapping->backing_dev_info; 948 current->backing_dev_info = inode_to_bdi(inode);
949 949
950 err = generic_write_checks(file, &pos, &count, S_ISBLK(inode->i_mode)); 950 err = generic_write_checks(file, &pos, &count, S_ISBLK(inode->i_mode));
951 if (err) 951 if (err)
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index f61a74115beb..6b5173605154 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -783,8 +783,6 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
783 } 783 }
784 784
785 inode->i_mapping->a_ops = &ceph_aops; 785 inode->i_mapping->a_ops = &ceph_aops;
786 inode->i_mapping->backing_dev_info =
787 &ceph_sb_to_client(inode->i_sb)->backing_dev_info;
788 786
789 switch (inode->i_mode & S_IFMT) { 787 switch (inode->i_mode & S_IFMT) {
790 case S_IFIFO: 788 case S_IFIFO:
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 50f06cddc94b..5ae62587a71d 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -40,17 +40,6 @@ static void ceph_put_super(struct super_block *s)
40 40
41 dout("put_super\n"); 41 dout("put_super\n");
42 ceph_mdsc_close_sessions(fsc->mdsc); 42 ceph_mdsc_close_sessions(fsc->mdsc);
43
44 /*
45 * ensure we release the bdi before put_anon_super releases
46 * the device name.
47 */
48 if (s->s_bdi == &fsc->backing_dev_info) {
49 bdi_unregister(&fsc->backing_dev_info);
50 s->s_bdi = NULL;
51 }
52
53 return;
54} 43}
55 44
56static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf) 45static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf)
@@ -910,7 +899,7 @@ static int ceph_register_bdi(struct super_block *sb,
910 >> PAGE_SHIFT; 899 >> PAGE_SHIFT;
911 else 900 else
912 fsc->backing_dev_info.ra_pages = 901 fsc->backing_dev_info.ra_pages =
913 default_backing_dev_info.ra_pages; 902 VM_MAX_READAHEAD * 1024 / PAGE_CACHE_SIZE;
914 903
915 err = bdi_register(&fsc->backing_dev_info, NULL, "ceph-%ld", 904 err = bdi_register(&fsc->backing_dev_info, NULL, "ceph-%ld",
916 atomic_long_inc_return(&bdi_seq)); 905 atomic_long_inc_return(&bdi_seq));
@@ -1002,11 +991,16 @@ out_final:
1002static void ceph_kill_sb(struct super_block *s) 991static void ceph_kill_sb(struct super_block *s)
1003{ 992{
1004 struct ceph_fs_client *fsc = ceph_sb_to_client(s); 993 struct ceph_fs_client *fsc = ceph_sb_to_client(s);
994 dev_t dev = s->s_dev;
995
1005 dout("kill_sb %p\n", s); 996 dout("kill_sb %p\n", s);
997
1006 ceph_mdsc_pre_umount(fsc->mdsc); 998 ceph_mdsc_pre_umount(fsc->mdsc);
1007 kill_anon_super(s); /* will call put_super after sb is r/o */ 999 generic_shutdown_super(s);
1008 ceph_mdsc_destroy(fsc); 1000 ceph_mdsc_destroy(fsc);
1001
1009 destroy_fs_client(fsc); 1002 destroy_fs_client(fsc);
1003 free_anon_bdev(dev);
1010} 1004}
1011 1005
1012static struct file_system_type ceph_fs_type = { 1006static struct file_system_type ceph_fs_type = {