/openbmc/linux/fs/nfs/ |
H A D | fscache.c | 285 struct nfs_netfs_io_data *netfs; in nfs_netfs_alloc() local 287 netfs = kzalloc(sizeof(*netfs), GFP_KERNEL_ACCOUNT); in nfs_netfs_alloc() 288 if (!netfs) in nfs_netfs_alloc() 290 netfs->sreq = sreq; in nfs_netfs_alloc() 291 refcount_set(&netfs->refcount, 1); in nfs_netfs_alloc() 292 return netfs; in nfs_netfs_alloc() 305 struct nfs_netfs_io_data *netfs; in nfs_netfs_issue_read() local 319 netfs = nfs_netfs_alloc(sreq); in nfs_netfs_issue_read() 320 if (!netfs) in nfs_netfs_issue_read() 323 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 66 if (!refcount_dec_and_test(&netfs->refcount)) in nfs_netfs_put() 77 final_len = min_t(s64, netfs->sreq->len, atomic64_read(&netfs->transferred)); in nfs_netfs_put() 78 netfs_subreq_terminated(netfs->sreq, netfs->error ?: final_len, false); in nfs_netfs_put() 79 kfree(netfs); in nfs_netfs_put() 83 netfs_inode_init(&nfsi->netfs, &nfs_netfs_ops); in nfs_netfs_inode_init() 132 struct fscache_cookie *cookie = netfs_i_cookie(&NFS_I(inode)->netfs); in nfs_fscache_invalidate() 151 hdr->netfs = desc->pg_netfs; in nfs_netfs_set_pgio_header() [all …]
|
/openbmc/linux/fs/netfs/ |
H A D | Makefile | 3 netfs-y := \ 10 netfs-$(CONFIG_NETFS_STATS) += stats.o 12 obj-$(CONFIG_NETFS_SUPPORT) := netfs.o
|
/openbmc/linux/fs/afs/ |
H A D | inode.c | 61 netfs_inode_init(&vnode->netfs, &afs_req_ops); in afs_set_netfs_context() 99 set_nlink(&vnode->netfs.inode, status->nlink); in afs_inode_init_from_status() 144 inode_set_iversion_raw(&vnode->netfs.inode, status->data_version); in afs_inode_init_from_status() 168 struct inode *inode = &vnode->netfs.inode; in afs_apply_status() 252 vnode->netfs.remote_i_size = status->size; in afs_apply_status() 295 clear_nlink(&vnode->netfs.inode); in afs_vnode_commit_status() 312 drop_nlink(&vnode->netfs.inode); in afs_vnode_commit_status() 313 if (vnode->netfs.inode.i_nlink == 0) { in afs_vnode_commit_status() 332 if (vnode->netfs.inode.i_state & I_NEW) { in afs_fetch_status_success() 436 vnode->netfs.cache = NULL; in afs_get_inode_cache() [all …]
|
H A D | dir_edit.c | 112 struct address_space *mapping = vnode->netfs.inode.i_mapping; in afs_dir_get_folio() 220 i_size = i_size_read(&vnode->netfs.inode); in afs_edit_dir_add() 340 inode_inc_iversion_raw(&vnode->netfs.inode); in afs_edit_dir_add() 387 i_size = i_size_read(&vnode->netfs.inode); in afs_edit_dir_remove() 467 inode_set_iversion_raw(&vnode->netfs.inode, vnode->status.data_version); in afs_edit_dir_remove() 513 i_size = i_size_read(&vnode->netfs.inode); in afs_edit_dir_update_dotdot() 561 inode_set_iversion_raw(&vnode->netfs.inode, vnode->status.data_version); in afs_edit_dir_update_dotdot()
|
H A D | write.c | 87 ret = netfs_write_begin(&vnode->netfs, file, mapping, pos, len, &folio, fsdata); in afs_write_begin() 181 i_size = i_size_read(&vnode->netfs.inode); in afs_write_end() 184 i_size = i_size_read(&vnode->netfs.inode); in afs_write_end() 292 struct address_space *mapping = vnode->netfs.inode.i_mapping; in afs_pages_written_back() 426 op->store.i_size = max(pos + size, vnode->netfs.remote_i_size); in afs_store_data() 427 op->mtime = vnode->netfs.inode.i_mtime; in afs_store_data() 590 loff_t i_size = i_size_read(&vnode->netfs.inode); in afs_write_back_from_locked_folio() 865 if (IS_SWAPFILE(&vnode->netfs.inode)) { in afs_file_write() 978 if (!mapping_tagged(&vnode->netfs.inode.i_data, PAGECACHE_TAG_WRITEBACK) && in afs_prune_wb_keys() 979 !mapping_tagged(&vnode->netfs.inode.i_data, PAGECACHE_TAG_DIRTY)) { in afs_prune_wb_keys() [all …]
|
H A D | dir.c | 114 struct address_space *mapping = req->vnode->netfs.inode.i_mapping; in afs_dir_read_cleanup() 158 __func__, dvnode->netfs.inode.i_ino, in afs_dir_check_folio() 188 struct address_space *mapping = dvnode->netfs.inode.i_mapping; in afs_dir_dump() 222 struct address_space *mapping = dvnode->netfs.inode.i_mapping; in afs_dir_check() 274 struct address_space *mapping = dvnode->netfs.inode.i_mapping; in afs_read_dir() 293 i_size = i_size_read(&dvnode->netfs.inode); in afs_read_dir() 313 iov_iter_xarray(&req->def_iter, ITER_DEST, &dvnode->netfs.inode.i_mapping->i_pages, in afs_read_dir() 903 inode = &op->file[1].vnode->netfs.inode; in afs_do_lookup() 1145 ret = afs_do_lookup_one(&dir->netfs.inode, dentry, &fid, key, &dir_version); in afs_d_revalidate() 1176 vnode->netfs.inode.i_generation); in afs_d_revalidate() [all …]
|
H A D | fs_operation.c | 235 iput(&op->file[0].vnode->netfs.inode); in afs_put_operation() 237 iput(&op->file[1].vnode->netfs.inode); in afs_put_operation() 242 iput(&op->more_files[i].vnode->netfs.inode); in afs_put_operation()
|
H A D | internal.h | 627 struct netfs_inode netfs; /* Netfslib context and vfs inode */ 678 return netfs_i_cookie(&vnode->netfs); in afs_vnode_cache() 688 vnode->netfs.cache = cookie; in afs_vnode_set_cache() 690 mapping_set_release_always(vnode->netfs.inode.i_mapping); 897 i_size_read(&vnode->netfs.inode), flags); 1218 return afs_i2net(&vnode->netfs.inode); in afs_sock2net() 1607 return container_of(inode, struct afs_vnode, netfs.inode); 1612 return &vnode->netfs.inode; 1635 i_size_write(&vnode->netfs.inode, size); 1636 vnode->netfs 624 struct netfs_inode netfs; /* Netfslib context and vfs inode */ global() member [all...] |
H A D | dir_silly.c | 134 ihold(&vnode->netfs.inode); in afs_sillyrename() 151 iput(&vnode->netfs.inode); in afs_sillyrename()
|
H A D | super.c | 664 inode_init_once(&vnode->netfs.inode); in afs_i_init_once() 705 _leave(" = %p", &vnode->netfs.inode); in afs_alloc_inode() 706 return &vnode->netfs.inode; in afs_alloc_inode()
|
/openbmc/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 | 137 struct netfs_inode netfs; /* Netfslib context and vfs inode */ member 145 return container_of(inode, struct v9fs_inode, netfs.inode); in V9FS_I() 151 return netfs_i_cookie(&v9inode->netfs); in v9fs_inode_cookie()
|
H A D | vfs_addr.c | 147 i_size_read(&v9inode->netfs.inode), 0); in v9fs_write_to_cache_done() 289 retval = netfs_write_begin(&v9inode->netfs, filp, mapping, pos, len, &folio, fsdata); in v9fs_write_begin()
|
/openbmc/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
|
/openbmc/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 | 497 dout("__cap_set_timeouts %p %lu\n", &ci->netfs.inode, in __cap_set_timeouts() 512 dout("__cap_delay_requeue %p flags 0x%lx at %lu\n", &ci->netfs.inode, in __cap_delay_requeue() 536 dout("__cap_delay_requeue_front %p\n", &ci->netfs.inode); in __cap_delay_requeue_front() 553 dout("__cap_delay_cancel %p\n", &ci->netfs.inode); in __cap_delay_cancel() 573 if (S_ISREG(ci->netfs.inode.i_mode) && in __check_cap_issue() 588 if (S_ISDIR(ci->netfs.inode.i_mode)) { in __check_cap_issue() 589 dout(" marking %p NOT complete\n", &ci->netfs.inode); in __check_cap_issue() 595 if (S_ISDIR(ci->netfs.inode.i_mode) && (had & CEPH_CAP_DIR_CREATE) && in __check_cap_issue() 777 "but STALE (gen %u vs %u)\n", &cap->ci->netfs.inode, in __cap_is_valid() 803 &ci->netfs.inode, cap, ceph_cap_string(cap->issued)); 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() 72 dout("ceph_vxattrcb_layout %p\n", &ci->netfs.inode); in ceph_vxattrcb_layout() 164 struct ceph_fs_client *fsc = ceph_sb_to_fs_client(ci->netfs.inode.i_sb); in ceph_vxattrcb_layout_pool() 316 struct ceph_fs_client *fsc = ceph_sb_to_fs_client(ci->netfs.inode.i_sb); in ceph_vxattrcb_cluster_fsid() 324 struct ceph_fs_client *fsc = ceph_sb_to_fs_client(ci->netfs.inode.i_sb); in ceph_vxattrcb_client_id() 661 ceph_vinop(&ci->netfs.inode), xattr, name_len, name, in __set_xattr() 907 dout("__build_xattrs_blob %p\n", &ci->netfs.inode); in __ceph_build_xattrs_blob()
|
H A D | cache.h | 31 return netfs_i_cookie(&ci->netfs); in ceph_fscache_cookie()
|
/openbmc/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 | fscache.h | 65 return netfs_i_cookie(&CIFS_I(inode)->netfs); in cifs_inode_cookie()
|
/openbmc/linux/Documentation/filesystems/ |
H A D | netfs_library.rst | 30 access must be provided by the netfs. 37 its use on each netfs inode it is helping to manage. To this end, a context 46 A network filesystem that wants to use netfs lib must place one of these in its 51 struct netfs_inode netfs; /* Netfslib context and vfs inode */ 85 then a function to cast from the VFS inode structure to the netfs context:: 106 * Insulate the netfs from VM interface changes. 108 * Allow the netfs to arbitrarily split reads up into pieces, even ones that 111 * Allow the netfs to expand a readahead request in both directions to meet its 114 * Allow the netfs to partially fulfil a read, which will then be resubmitted. 197 The above fields are the ones the netfs can use. They are: [all …]
|
/openbmc/linux/fs/cachefiles/ |
H A D | Kconfig | 37 the data lies with the cachefiles backend instead of with the netfs
|