super.c (8834147f9505661859ce44549bf601e2a06bba7c) super.c (2d7c86a8f9cdce1408c4f3c69d94d007eff2f179)
1// SPDX-License-Identifier: GPL-2.0-only
2
3#include <linux/ceph/ceph_debug.h>
4
5#include <linux/backing-dev.h>
6#include <linux/ctype.h>
7#include <linux/fs.h>
8#include <linux/inet.h>

--- 258 unchanged lines hidden (view full) ---

267 if (dev_name_end < dev_name || *dev_name_end != ':')
268 return invalfc(fc, "No path or : separator in source");
269
270 dout("device name '%.*s'\n", (int)(dev_name_end - dev_name), dev_name);
271 if (fsopt->server_path)
272 dout("server path '%s'\n", fsopt->server_path);
273
274 ret = ceph_parse_mon_ips(param->string, dev_name_end - dev_name,
1// SPDX-License-Identifier: GPL-2.0-only
2
3#include <linux/ceph/ceph_debug.h>
4
5#include <linux/backing-dev.h>
6#include <linux/ctype.h>
7#include <linux/fs.h>
8#include <linux/inet.h>

--- 258 unchanged lines hidden (view full) ---

267 if (dev_name_end < dev_name || *dev_name_end != ':')
268 return invalfc(fc, "No path or : separator in source");
269
270 dout("device name '%.*s'\n", (int)(dev_name_end - dev_name), dev_name);
271 if (fsopt->server_path)
272 dout("server path '%s'\n", fsopt->server_path);
273
274 ret = ceph_parse_mon_ips(param->string, dev_name_end - dev_name,
275 pctx->copts, fc->log.log);
275 pctx->copts, fc->log.log, ',');
276 if (ret)
277 return ret;
278
279 fc->source = param->string;
280 param->string = NULL;
281 return 0;
282}
283

--- 498 unchanged lines hidden (view full) ---

782 ceph_mds_request_cachep = KMEM_CACHE(ceph_mds_request, SLAB_MEM_SPREAD);
783 if (!ceph_mds_request_cachep)
784 goto bad_mds_req;
785
786 ceph_wb_pagevec_pool = mempool_create_kmalloc_pool(10, CEPH_MAX_WRITE_SIZE >> PAGE_SHIFT);
787 if (!ceph_wb_pagevec_pool)
788 goto bad_pagevec_pool;
789
276 if (ret)
277 return ret;
278
279 fc->source = param->string;
280 param->string = NULL;
281 return 0;
282}
283

--- 498 unchanged lines hidden (view full) ---

782 ceph_mds_request_cachep = KMEM_CACHE(ceph_mds_request, SLAB_MEM_SPREAD);
783 if (!ceph_mds_request_cachep)
784 goto bad_mds_req;
785
786 ceph_wb_pagevec_pool = mempool_create_kmalloc_pool(10, CEPH_MAX_WRITE_SIZE >> PAGE_SHIFT);
787 if (!ceph_wb_pagevec_pool)
788 goto bad_pagevec_pool;
789
790 error = ceph_fscache_register();
791 if (error)
792 goto bad_fscache;
793
790 return 0;
791
794 return 0;
795
792bad_pagevec_pool:
796bad_fscache:
793 kmem_cache_destroy(ceph_mds_request_cachep);
797 kmem_cache_destroy(ceph_mds_request_cachep);
798bad_pagevec_pool:
799 mempool_destroy(ceph_wb_pagevec_pool);
794bad_mds_req:
795 kmem_cache_destroy(ceph_dir_file_cachep);
796bad_dir_file:
797 kmem_cache_destroy(ceph_file_cachep);
798bad_file:
799 kmem_cache_destroy(ceph_dentry_cachep);
800bad_dentry:
801 kmem_cache_destroy(ceph_cap_flush_cachep);

--- 15 unchanged lines hidden (view full) ---

817 kmem_cache_destroy(ceph_inode_cachep);
818 kmem_cache_destroy(ceph_cap_cachep);
819 kmem_cache_destroy(ceph_cap_flush_cachep);
820 kmem_cache_destroy(ceph_dentry_cachep);
821 kmem_cache_destroy(ceph_file_cachep);
822 kmem_cache_destroy(ceph_dir_file_cachep);
823 kmem_cache_destroy(ceph_mds_request_cachep);
824 mempool_destroy(ceph_wb_pagevec_pool);
800bad_mds_req:
801 kmem_cache_destroy(ceph_dir_file_cachep);
802bad_dir_file:
803 kmem_cache_destroy(ceph_file_cachep);
804bad_file:
805 kmem_cache_destroy(ceph_dentry_cachep);
806bad_dentry:
807 kmem_cache_destroy(ceph_cap_flush_cachep);

--- 15 unchanged lines hidden (view full) ---

823 kmem_cache_destroy(ceph_inode_cachep);
824 kmem_cache_destroy(ceph_cap_cachep);
825 kmem_cache_destroy(ceph_cap_flush_cachep);
826 kmem_cache_destroy(ceph_dentry_cachep);
827 kmem_cache_destroy(ceph_file_cachep);
828 kmem_cache_destroy(ceph_dir_file_cachep);
829 kmem_cache_destroy(ceph_mds_request_cachep);
830 mempool_destroy(ceph_wb_pagevec_pool);
831
832 ceph_fscache_unregister();
825}
826
827static void __ceph_umount_begin(struct ceph_fs_client *fsc)
828{
829 ceph_osdc_abort_requests(&fsc->client->osdc, -EIO);
830 ceph_mdsc_force_umount(fsc->mdsc);
831 fsc->filp_gen++; // invalidate open files
832}

--- 503 unchanged lines hidden ---
833}
834
835static void __ceph_umount_begin(struct ceph_fs_client *fsc)
836{
837 ceph_osdc_abort_requests(&fsc->client->osdc, -EIO);
838 ceph_mdsc_force_umount(fsc->mdsc);
839 fsc->filp_gen++; // invalidate open files
840}

--- 503 unchanged lines hidden ---