| /linux/fs/nfs/ |
| H A D | fscache.c | 289 struct nfs_netfs_io_data *netfs; in nfs_netfs_alloc() local 291 netfs = kzalloc_obj(*netfs, GFP_KERNEL_ACCOUNT); in nfs_netfs_alloc() 292 if (!netfs) in nfs_netfs_alloc() 294 netfs->sreq = sreq; in nfs_netfs_alloc() 295 refcount_set(&netfs->refcount, 1); in nfs_netfs_alloc() 296 return netfs; in nfs_netfs_alloc() 301 struct nfs_netfs_io_data *netfs; in nfs_netfs_issue_read() local 316 netfs = nfs_netfs_alloc(sreq); in nfs_netfs_issue_read() 317 if (!netfs) { in nfs_netfs_issue_read() 322 pgio.pg_netfs = netfs; /* used in completion */ in nfs_netfs_issue_read() [all …]
|
| H A D | fscache.h | 56 static inline void nfs_netfs_get(struct nfs_netfs_io_data *netfs) in nfs_netfs_get() argument 58 refcount_inc(&netfs->refcount); in nfs_netfs_get() 61 static inline void nfs_netfs_put(struct nfs_netfs_io_data *netfs) in nfs_netfs_put() argument 64 if (!refcount_dec_and_test(&netfs->refcount)) in nfs_netfs_put() 75 netfs->sreq->transferred = min_t(s64, netfs->sreq->len, in nfs_netfs_put() 76 atomic64_read(&netfs->transferred)); in nfs_netfs_put() 77 netfs->sreq->error = netfs->error; in nfs_netfs_put() 78 netfs_read_subreq_terminated(netfs->sreq); in nfs_netfs_put() 79 kfree(netfs); in nfs_netfs_put() 83 netfs_inode_init(&nfsi->netfs, &nfs_netfs_ops, false); in nfs_netfs_inode_init() [all …]
|
| /linux/fs/netfs/ |
| H A D | Makefile | 3 netfs-y := \ 22 netfs-$(CONFIG_NETFS_STATS) += stats.o 24 netfs-$(CONFIG_FSCACHE) += \ 32 netfs-$(CONFIG_FSCACHE) += fscache_proc.o 34 netfs-$(CONFIG_FSCACHE_STATS) += fscache_stats.o 36 obj-$(CONFIG_NETFS_SUPPORT) += netfs.o
|
| /linux/fs/afs/ |
| H A D | symlink.c | 66 if (!fscache_cookie_enabled(netfs_i_cookie(&vnode->netfs))) in afs_init_new_symlink() 70 mapping_gfp_mask(vnode->netfs.inode.i_mapping)) < 0) in afs_init_new_symlink() 77 netfs_single_mark_inode_dirty(&vnode->netfs.inode); in afs_init_new_symlink() 90 i_size = i_size_read(&vnode->netfs.inode); in afs_do_read_symlink() 101 mapping_gfp_mask(vnode->netfs.inode.i_mapping)); in afs_do_read_symlink() 112 ret = netfs_read_single(&vnode->netfs.inode, NULL, &iter); in afs_do_read_symlink() 138 if (!fscache_cookie_enabled(netfs_i_cookie(&vnode->netfs))) { in afs_do_read_symlink() 244 netfs_single_mark_inode_dirty(&vnode->netfs.inode); in afs_symlink_writepages() 253 i_size_read(&vnode->netfs.inode)); in afs_symlink_writepages() 258 mutex_lock(&vnode->netfs.wb_lock); in afs_symlink_writepages() [all …]
|
| H A D | inode.c | 57 netfs_inode_init(&vnode->netfs, &afs_req_ops, true); in afs_set_netfs_context() 94 set_nlink(&vnode->netfs.inode, status->nlink); in afs_inode_init_from_status() 109 __set_bit(NETFS_ICTX_SINGLE_NO_UPLOAD, &vnode->netfs.flags); in afs_inode_init_from_status() 143 inode_set_iversion_raw(&vnode->netfs.inode, status->data_version); in afs_inode_init_from_status() 167 struct netfs_inode *ictx = &vnode->netfs; in afs_apply_status() 316 clear_nlink(&vnode->netfs.inode); in afs_vnode_commit_status() 333 drop_nlink(&vnode->netfs.inode); in afs_vnode_commit_status() 334 if (vnode->netfs.inode.i_nlink == 0) { in afs_vnode_commit_status() 353 if (inode_state_read_once(&vnode->netfs.inode) & I_NEW) { in afs_fetch_status_success() 459 vnode->netfs.cache = NULL; in afs_get_inode_cache() [all …]
|
| H A D | dir_edit.c | 125 mapping_gfp_mask(dvnode->netfs.inode.i_mapping)); in afs_dir_get_block() 254 i_size = i_size_read(&vnode->netfs.inode); in afs_edit_dir_add() 363 inode_inc_iversion_raw(&vnode->netfs.inode); in afs_edit_dir_add() 367 netfs_single_mark_inode_dirty(&vnode->netfs.inode); in afs_edit_dir_add() 407 i_size = i_size_read(&vnode->netfs.inode); in afs_edit_dir_remove() 499 netfs_single_mark_inode_dirty(&vnode->netfs.inode); in afs_edit_dir_remove() 501 inode_set_iversion_raw(&vnode->netfs.inode, vnode->status.data_version); in afs_edit_dir_remove() 540 i_size = i_size_read(&vnode->netfs.inode); in afs_edit_dir_update() 582 netfs_single_mark_inode_dirty(&vnode->netfs.inode); in afs_edit_dir_update() 583 inode_set_iversion_raw(&vnode->netfs.inode, vnode->status.data_version); in afs_edit_dir_update() [all …]
|
| H A D | validation.c | 376 if (S_ISREG(vnode->netfs.inode.i_mode)) in afs_zap_data() 377 filemap_invalidate_inode(&vnode->netfs.inode, true, 0, LLONG_MAX); in afs_zap_data() 379 filemap_invalidate_inode(&vnode->netfs.inode, false, 0, LLONG_MAX); in afs_zap_data() 432 unmap_mapping_pages(vnode->netfs.inode.i_mapping, 0, 0, false); in afs_validate() 474 if (S_ISREG(vnode->netfs.inode.i_mode)) in afs_validate() 476 else if (S_ISLNK(vnode->netfs.inode.i_mode)) in afs_validate()
|
| H A D | dir.c | 102 loff_t i_size = i_size_read(&dvnode->netfs.inode); in afs_dir_unuse_cookie() 136 unsigned long long i_size = i_size_read(&dvnode->netfs.inode); in afs_dir_dump() 154 __func__, dvnode->netfs.inode.i_ino, in afs_dir_check_block() 198 unsigned long long i_size = i_size_read(&dvnode->netfs.inode); in afs_dir_check() 239 i_size = i_size_read(&dvnode->netfs.inode); in afs_do_read_single() 253 mapping_gfp_mask(dvnode->netfs.inode.i_mapping)); in afs_do_read_single() 265 ret = netfs_read_single(&dvnode->netfs.inode, file, &iter); in afs_do_read_single() 267 i_size = i_size_read(&dvnode->netfs.inode); in afs_do_read_single() 304 i_size = i_size_read(&dvnode->netfs.inode); in afs_read_dir() 879 inode = &op->file[1].vnode->netfs.inode; in afs_do_lookup() [all …]
|
| H A D | write.c | 145 op->store.i_size = umax(pos + len, netfs_read_remote_i_size(&vnode->netfs.inode)); in afs_issue_write_worker() 146 op->mtime = inode_get_mtime(&vnode->netfs.inode); in afs_issue_write_worker() 293 if (!mapping_tagged(&vnode->netfs.inode.i_data, PAGECACHE_TAG_WRITEBACK) && in afs_prune_wb_keys() 294 !mapping_tagged(&vnode->netfs.inode.i_data, PAGECACHE_TAG_DIRTY)) { in afs_prune_wb_keys()
|
| H A D | fs_operation.c | 343 iput(&op->file[0].vnode->netfs.inode); in afs_put_operation() 345 iput(&op->file[1].vnode->netfs.inode); in afs_put_operation() 350 iput(&op->more_files[i].vnode->netfs.inode); in afs_put_operation()
|
| H A D | internal.h | 687 struct netfs_inode netfs; /* Netfslib context and vfs inode */ member 742 return netfs_i_cookie(&vnode->netfs); in afs_vnode_cache() 752 vnode->netfs.cache = cookie; in afs_vnode_set_cache() 754 mapping_set_release_always(vnode->netfs.inode.i_mapping); in afs_vnode_set_cache() 986 i_size_read(&vnode->netfs.inode), flags); in afs_invalidate_cache() 1296 return afs_i2net(&vnode->netfs.inode); in afs_v2net() 1758 return container_of(inode, struct afs_vnode, netfs.inode); in AFS_FS_I() 1763 return &vnode->netfs.inode; in AFS_VNODE_TO_I()
|
| H A D | dir_silly.c | 143 ihold(&vnode->netfs.inode); in afs_sillyrename() 160 iput(&vnode->netfs.inode); in afs_sillyrename()
|
| H A D | super.c | 654 inode_init_once(&vnode->netfs.inode); in afs_i_init_once() 697 _leave(" = %p", &vnode->netfs.inode); in afs_alloc_inode() 698 return &vnode->netfs.inode; in afs_alloc_inode()
|
| /linux/Documentation/filesystems/caching/ |
| H A D | fscache.rst | 25 | | | netfs |-->| |--+ 71 FS-Cache does not follow the idea of completely loading every netfs file 73 then serving the pages out of that cache rather than the netfs inode because: 87 It instead serves the cache out in chunks as and when requested by the netfs 98 * The netfs is provided with an interface that allows either party to 101 * The interface to the netfs returns as few errors as possible, preferring 102 rather to let the netfs remain oblivious. 106 to the netfs; the netfs gets a volume cookie to represent a collection of 107 files (typically something that a netfs would get for a superblock); and 136 netfs using an iov_iter. [all …]
|
| H A D | index.rst | 10 netfs-api
|
| H A D | backend-api.rst | 206 * FSCACHE_COOKIE_LOCAL_WRITE - The netfs's data has been modified 328 called when the cookie is relinquished by the netfs, withdrawn or culled 345 the netfs file due to local truncation. The cache backend should make all 347 netfs inode mutex. 350 withdrawal and the netfs must have the cookie marked in-use to prevent 384 * Begin an operation for the netfs lib [mandatory]:: 416 A cache backend provides a data I/O API by through the netfs library's ``struct
|
| /linux/fs/smb/client/ |
| H A D | fscache.c | 138 cifs_fscache_fill_coherency(&cifsi->netfs.inode, &cd); in cifs_fscache_get_inode_cookie() 140 cifsi->netfs.cache = in cifs_fscache_get_inode_cookie() 144 i_size_read(&cifsi->netfs.inode)); in cifs_fscache_get_inode_cookie() 145 if (cifsi->netfs.cache) in cifs_fscache_get_inode_cookie() 170 cifsi->netfs.cache = NULL; in cifs_fscache_release_inode_cookie()
|
| H A D | cifsfs.c | 440 cifs_inode->netfs.inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */ in cifs_alloc_inode() 441 cifs_inode->netfs._remote_i_size = 0; in cifs_alloc_inode() 442 cifs_inode->netfs._zero_point = 0; in cifs_alloc_inode() 454 /* cifs_inode->netfs.inode.i_flags = S_NOATIME | S_NOCMTIME; */ in cifs_alloc_inode() 459 return &cifs_inode->netfs.inode; 1319 netfs_resize_file(&src_cifsi->netfs, src_end, true); in cifs_remap_file_range() 1439 if (fend > target_cifsi->netfs._zero_point) in cifs_file_copychunk_range() 1475 if (new_size > target_cifsi->netfs._zero_point) in cifs_file_copychunk_range() 1572 netfs_resize_file(&target_cifsi->netfs, in cifs_copy_file_range() 1579 if (destoff + rc > target_cifsi->netfs [all...] |
| /linux/fs/9p/ |
| H A D | cache.c | 65 v9inode->netfs.cache = in v9fs_cache_inode_get_cookie() 70 i_size_read(&v9inode->netfs.inode)); in v9fs_cache_inode_get_cookie() 71 if (v9inode->netfs.cache) in v9fs_cache_inode_get_cookie()
|
| H A D | v9fs.h | 12 #include <linux/netfs.h> 148 struct netfs_inode netfs; /* Netfslib context and vfs inode */ in V9FS_I() 156 return container_of(inode, struct v9fs_inode, netfs.inode); in v9fs_inode_cookie() 162 return netfs_i_cookie(&v9inode->netfs); in v9fs_session_cache() 140 struct netfs_inode netfs; /* Netfslib context and vfs inode */ global() member
|
| /linux/fs/ceph/ |
| H A D | cache.c | 32 WARN_ON_ONCE(ci->netfs.cache); in ceph_fscache_register_inode_cookie() 34 ci->netfs.cache = in ceph_fscache_register_inode_cookie() 39 if (ci->netfs.cache) in ceph_fscache_register_inode_cookie()
|
| H A D | caps.c | 501 struct inode *inode = &ci->netfs.inode; in __cap_set_timeouts() 521 struct inode *inode = &ci->netfs.inode; in __cap_delay_requeue() 548 struct inode *inode = &ci->netfs.inode; in __cap_delay_requeue_front() 567 struct inode *inode = &ci->netfs.inode; in __cap_delay_cancel() 581 struct inode *inode = &ci->netfs.inode; in __check_cap_issue() 592 if (S_ISREG(ci->netfs.inode.i_mode) && in __check_cap_issue() 607 if (S_ISDIR(ci->netfs.inode.i_mode)) { in __check_cap_issue() 614 if (S_ISDIR(ci->netfs.inode.i_mode) && (had & CEPH_CAP_DIR_CREATE) && in __check_cap_issue() 790 struct inode *inode = &cap->ci->netfs.inode; in __cap_is_valid() 815 struct inode *inode = &ci->netfs.inode; in __ceph_caps_issued() [all …]
|
| H A D | xattr.c | 60 struct ceph_fs_client *fsc = ceph_sb_to_fs_client(ci->netfs.inode.i_sb); in ceph_vxattrcb_layout() 73 doutc(cl, "%p\n", &ci->netfs.inode); in ceph_vxattrcb_layout() 165 struct ceph_fs_client *fsc = ceph_sb_to_fs_client(ci->netfs.inode.i_sb); in ceph_vxattrcb_layout_pool() 315 struct ceph_fs_client *fsc = ceph_sb_to_fs_client(ci->netfs.inode.i_sb); in ceph_vxattrcb_cluster_fsid() 323 struct ceph_fs_client *fsc = ceph_sb_to_fs_client(ci->netfs.inode.i_sb); in ceph_vxattrcb_client_id() 572 struct inode *inode = &ci->netfs.inode; in __set_xattr() 672 struct ceph_client *cl = ceph_inode_to_client(&ci->netfs.inode); in __get_xattr() 740 struct ceph_client *cl = ceph_inode_to_client(&ci->netfs.inode); in __copy_xattr_names() 764 struct ceph_client *cl = ceph_inode_to_client(&ci->netfs.inode); in __ceph_destroy_xattrs() 881 struct ceph_client *cl = ceph_inode_to_client(&ci->netfs.inode); in __get_required_blob_size() [all …]
|
| H A D | cache.h | 31 return netfs_i_cookie(&ci->netfs); in ceph_fscache_cookie()
|
| /linux/fs/cachefiles/ |
| H A D | Kconfig | 37 the data lies with the cachefiles backend instead of with the netfs
|