| /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
|
| H A D | Kconfig | 31 enabled by setting bits in /sys/module/netfs/parameters/debug.
|
| /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() 137 if (!fscache_cookie_enabled(netfs_i_cookie(&vnode->netfs))) { in afs_do_read_symlink() 243 netfs_single_mark_inode_dirty(&vnode->netfs.inode); in afs_symlink_writepages() 252 i_size_read(&vnode->netfs.inode)); in afs_symlink_writepages() 257 netfs_wb_begin(&vnode->netfs, false); in afs_symlink_writepages() [all …]
|
| H A D | inode.c | 57 netfs_inode_init(&vnode->netfs, &afs_req_ops, is_file); in afs_set_netfs_context() 94 set_nlink(&vnode->netfs.inode, status->nlink); in afs_inode_init_from_status() 113 __set_bit(NETFS_ICTX_SINGLE_NO_UPLOAD, &vnode->netfs.flags); in afs_inode_init_from_status() 142 inode_set_iversion_raw(&vnode->netfs.inode, status->data_version); in afs_inode_init_from_status() 166 struct netfs_inode *ictx = &vnode->netfs; in afs_apply_status() 315 clear_nlink(&vnode->netfs.inode); in afs_vnode_commit_status() 332 drop_nlink(&vnode->netfs.inode); in afs_vnode_commit_status() 333 if (vnode->netfs.inode.i_nlink == 0) { in afs_vnode_commit_status() 352 if (inode_state_read_once(&vnode->netfs.inode) & I_NEW) { in afs_fetch_status_success() 458 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() 496 netfs_single_mark_inode_dirty(&vnode->netfs.inode); in afs_edit_dir_remove() 498 inode_set_iversion_raw(&vnode->netfs.inode, vnode->status.data_version); in afs_edit_dir_remove() 535 i_size = i_size_read(&vnode->netfs.inode); in afs_edit_dir_update() 577 netfs_single_mark_inode_dirty(&vnode->netfs.inode); in afs_edit_dir_update() 578 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 | 104 loff_t i_size = i_size_read(&dvnode->netfs.inode); in afs_dir_unuse_cookie() 138 unsigned long long i_size = i_size_read(&dvnode->netfs.inode); in afs_dir_dump() 156 __func__, dvnode->netfs.inode.i_ino, in afs_dir_check_block() 200 unsigned long long i_size = i_size_read(&dvnode->netfs.inode); in afs_dir_check() 241 i_size = i_size_read(&dvnode->netfs.inode); in afs_do_read_single() 255 mapping_gfp_mask(dvnode->netfs.inode.i_mapping)); in afs_do_read_single() 267 ret = netfs_read_single(&dvnode->netfs.inode, file, &iter); in afs_do_read_single() 269 i_size = i_size_read(&dvnode->netfs.inode); in afs_do_read_single() 306 i_size = i_size_read(&dvnode->netfs.inode); in afs_read_dir() 889 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 | dir_search.c | 42 unsigned long long i_size = i_size_read(&iter->dvnode->netfs.inode); in afs_dir_reset_iter() 190 _enter("{%llu},,,", dvnode->netfs.inode.i_ino); in afs_dir_search() 210 *_dir_version = inode_peek_iversion_raw(&dvnode->netfs.inode); in afs_dir_search()
|
| 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 | dynroot.c | 68 netfs_inode_init(&vnode->netfs, NULL, false); in afs_iget_pseudo_dir() 263 netfs_inode_init(&vnode->netfs, NULL, false); in afs_lookup_atcell() 388 netfs_inode_init(&vnode->netfs, NULL, false); in afs_dynroot_iget_root()
|
| H A D | internal.h | 688 struct netfs_inode netfs; /* Netfslib context and vfs inode */ member 743 return netfs_i_cookie(&vnode->netfs); in afs_vnode_cache() 753 vnode->netfs.cache = cookie; in afs_vnode_set_cache() 985 i_size_read(&vnode->netfs.inode), flags); in afs_invalidate_cache() 1303 return afs_i2net(&vnode->netfs.inode); in afs_v2net() 1766 return container_of(inode, struct afs_vnode, netfs.inode); in AFS_FS_I() 1771 return &vnode->netfs.inode; in AFS_VNODE_TO_I()
|
| H A D | super.c | 655 inode_init_once(&vnode->netfs.inode); in afs_i_init_once() 698 _leave(" = %p", &vnode->netfs.inode); in afs_alloc_inode() 699 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
|
| H A D | netfs-api.rst | 366 The *clear* function is intended to be called from the netfs's ``evict_inode`` 382 Firstly, the netfs should determine if caching is available by doing something 388 the following functions provided by the netfs helper library:: 394 Once all the pages in the span are marked, the netfs can ask fscache to 419 the cache object to be written to, i_size indicates the size of the netfs file
|
| /linux/fs/smb/client/ |
| H A D | fscache.c | 134 cifs_fscache_fill_coherency(&cifsi->netfs.inode, &cd); in cifs_fscache_get_inode_cookie() 136 cifsi->netfs.cache = in cifs_fscache_get_inode_cookie() 140 i_size_read(&cifsi->netfs.inode)); in cifs_fscache_get_inode_cookie() 141 if (cifsi->netfs.cache) in cifs_fscache_get_inode_cookie() 166 cifsi->netfs.cache = NULL; in cifs_fscache_release_inode_cookie()
|
| /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()
|
| /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 = &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() 882 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()
|