Home
last modified time | relevance | path

Searched refs:netfs (Results 1 – 25 of 50) sorted by relevance

12

/Linux-v6.6/fs/nfs/
Dfscache.c285 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 …]
Dfscache.h56 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 …]
/Linux-v6.6/fs/netfs/
DMakefile3 netfs-y := \
10 netfs-$(CONFIG_NETFS_STATS) += stats.o
12 obj-$(CONFIG_NETFS_SUPPORT) := netfs.o
/Linux-v6.6/fs/afs/
Dinode.c61 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 …]
Dwrite.c87 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 …]
Ddir_edit.c112 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()
Dfs_operation.c235 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()
Dinternal.h622 struct netfs_inode netfs; /* Netfslib context and vfs inode */ member
673 return netfs_i_cookie(&vnode->netfs); in afs_vnode_cache()
683 vnode->netfs.cache = cookie; in afs_vnode_set_cache()
685 mapping_set_release_always(vnode->netfs.inode.i_mapping); in afs_vnode_set_cache()
892 i_size_read(&vnode->netfs.inode), flags); in afs_invalidate_cache()
1211 return afs_i2net(&vnode->netfs.inode); in afs_v2net()
1586 return container_of(inode, struct afs_vnode, netfs.inode); in AFS_FS_I()
1591 return &vnode->netfs.inode; in AFS_VNODE_TO_I()
1614 i_size_write(&vnode->netfs.inode, size); in afs_set_i_size()
1615 vnode->netfs.inode.i_blocks = ((size + 1023) >> 10) << 1; in afs_set_i_size()
Ddir.c113 struct address_space *mapping = req->vnode->netfs.inode.i_mapping; in afs_dir_read_cleanup()
157 __func__, dvnode->netfs.inode.i_ino, in afs_dir_check_folio()
187 struct address_space *mapping = dvnode->netfs.inode.i_mapping; in afs_dir_dump()
221 struct address_space *mapping = dvnode->netfs.inode.i_mapping; in afs_dir_check()
273 struct address_space *mapping = dvnode->netfs.inode.i_mapping; in afs_read_dir()
292 i_size = i_size_read(&dvnode->netfs.inode); in afs_read_dir()
312 iov_iter_xarray(&req->def_iter, ITER_DEST, &dvnode->netfs.inode.i_mapping->i_pages, in afs_read_dir()
902 inode = &op->file[1].vnode->netfs.inode; in afs_do_lookup()
1144 ret = afs_do_lookup_one(&dir->netfs.inode, dentry, &fid, key, &dir_version); in afs_d_revalidate()
1175 vnode->netfs.inode.i_generation); in afs_d_revalidate()
[all …]
Ddir_silly.c134 ihold(&vnode->netfs.inode); in afs_sillyrename()
151 iput(&vnode->netfs.inode); in afs_sillyrename()
Dsuper.c662 inode_init_once(&vnode->netfs.inode); in afs_i_init_once()
703 _leave(" = %p", &vnode->netfs.inode); in afs_alloc_inode()
704 return &vnode->netfs.inode; in afs_alloc_inode()
/Linux-v6.6/fs/9p/
Dcache.c65 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()
Dv9fs.h137 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()
Dvfs_addr.c147 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()
/Linux-v6.6/Documentation/filesystems/caching/
Dfscache.rst25 | | | 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 …]
Dindex.rst10 netfs-api
Dbackend-api.rst206 * 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-v6.6/fs/smb/client/
Dfscache.c104 cifs_fscache_fill_coherency(&cifsi->netfs.inode, &cd); in cifs_fscache_get_inode_cookie()
106 cifsi->netfs.cache = in cifs_fscache_get_inode_cookie()
110 i_size_read(&cifsi->netfs.inode)); in cifs_fscache_get_inode_cookie()
111 if (cifsi->netfs.cache) in cifs_fscache_get_inode_cookie()
136 cifsi->netfs.cache = NULL; in cifs_fscache_release_inode_cookie()
Dfscache.h56 cd->last_write_time_sec = cpu_to_le64(cifsi->netfs.inode.i_mtime.tv_sec); in cifs_fscache_fill_coherency()
57 cd->last_write_time_nsec = cpu_to_le32(cifsi->netfs.inode.i_mtime.tv_nsec); in cifs_fscache_fill_coherency()
65 return netfs_i_cookie(&CIFS_I(inode)->netfs); in cifs_inode_cookie()
/Linux-v6.6/fs/ceph/
Dcache.c32 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()
Dcaps.c497 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 …]
Dcache.h31 return netfs_i_cookie(&ci->netfs); in ceph_fscache_cookie()
Dxattr.c60 struct ceph_fs_client *fsc = ceph_sb_to_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_client(ci->netfs.inode.i_sb); in ceph_vxattrcb_layout_pool()
316 struct ceph_fs_client *fsc = ceph_sb_to_client(ci->netfs.inode.i_sb); in ceph_vxattrcb_cluster_fsid()
324 struct ceph_fs_client *fsc = ceph_sb_to_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()
/Linux-v6.6/Documentation/filesystems/
Dnetfs_library.rst30 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 …]
/Linux-v6.6/fs/cachefiles/
DKconfig37 the data lies with the cachefiles backend instead of with the netfs

12