Home
last modified time | relevance | path

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

123

/linux/fs/nfs/
H A Dfscache.c281 netfs = kzalloc(sizeof(*netfs), GFP_KERNEL_ACCOUNT); in nfs_netfs_alloc()
282 if (!netfs) in nfs_netfs_alloc()
284 netfs->sreq = sreq; in nfs_netfs_alloc()
286 return netfs; in nfs_netfs_alloc()
314 if (!netfs) in nfs_netfs_issue_read()
334 struct nfs_netfs_io_data *netfs = hdr->netfs; in nfs_netfs_initiate_read() local
336 if (!netfs) in nfs_netfs_initiate_read()
357 struct nfs_netfs_io_data *netfs = hdr->netfs; in nfs_netfs_read_completion() local
360 if (!netfs) in nfs_netfs_read_completion()
363 sreq = netfs->sreq; in nfs_netfs_read_completion()
[all …]
H A 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, false); in nfs_netfs_inode_init()
85 __set_bit(NETFS_ICTX_USE_PGPRIV2, &nfsi->netfs.flags); in nfs_netfs_inode_init()
153 hdr->netfs = desc->pg_netfs; in nfs_netfs_set_pgio_header()
[all …]
/linux/fs/netfs/
H A DMakefile3 netfs-y := \
17 netfs-$(CONFIG_NETFS_STATS) += stats.o
19 netfs-$(CONFIG_FSCACHE) += \
27 netfs-$(CONFIG_FSCACHE) += fscache_proc.o
29 netfs-$(CONFIG_FSCACHE_STATS) += fscache_stats.o
31 obj-$(CONFIG_NETFS_SUPPORT) += netfs.o
/linux/fs/afs/
H A Dinode.c166 struct inode *inode = &vnode->netfs.inode; in afs_apply_status()
253 vnode->netfs.remote_i_size = status->size; in afs_apply_status()
257 vnode->netfs.zero_point = status->size; in afs_apply_status()
298 clear_nlink(&vnode->netfs.inode); in afs_vnode_commit_status()
315 drop_nlink(&vnode->netfs.inode); in afs_vnode_commit_status()
316 if (vnode->netfs.inode.i_nlink == 0) { in afs_vnode_commit_status()
335 if (vnode->netfs.inode.i_state & I_NEW) { in afs_fetch_status_success()
439 vnode->netfs.cache = NULL; in afs_get_inode_cache()
456 i_size_read(&vnode->netfs.inode))); in afs_get_inode_cache()
615 stat->size = vnode->netfs.remote_i_size; in afs_getattr()
[all …]
H A Dwrite.c144 op->store.i_size = umax(pos + len, vnode->netfs.remote_i_size); in afs_issue_write_worker()
145 op->mtime = inode_get_mtime(&vnode->netfs.inode); in afs_issue_write_worker()
276 if (!mapping_tagged(&vnode->netfs.inode.i_data, PAGECACHE_TAG_WRITEBACK) && in afs_prune_wb_keys()
277 !mapping_tagged(&vnode->netfs.inode.i_data, PAGECACHE_TAG_DIRTY)) { in afs_prune_wb_keys()
H A Dvalidation.c367 if (S_ISREG(vnode->netfs.inode.i_mode)) in afs_zap_data()
368 filemap_invalidate_inode(&vnode->netfs.inode, true, 0, LLONG_MAX); in afs_zap_data()
370 filemap_invalidate_inode(&vnode->netfs.inode, false, 0, LLONG_MAX); in afs_zap_data()
423 unmap_mapping_pages(vnode->netfs.inode.i_mapping, 0, 0, false); in afs_validate()
H A 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()
H A Ddir.c157 __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()
292 i_size = i_size_read(&dvnode->netfs.inode); in afs_read_dir()
909 inode = &op->file[1].vnode->netfs.inode; in afs_do_lookup()
1188 vnode->netfs.inode.i_generation); in afs_d_revalidate()
1274 clear_nlink(&vnode->netfs.inode); in afs_check_for_remote_deletion()
1388 clear_nlink(&vnode->netfs.inode); in afs_dir_remove_subdir()
1507 drop_nlink(&vnode->netfs.inode); in afs_dir_remove_link()
1508 if (vnode->netfs.inode.i_nlink == 0) { in afs_dir_remove_link()
1701 ihold(&vp->vnode->netfs.inode); in afs_link_success()
[all …]
H A Dfs_operation.c244 iput(&op->file[0].vnode->netfs.inode); in afs_put_operation()
246 iput(&op->file[1].vnode->netfs.inode); in afs_put_operation()
251 iput(&op->more_files[i].vnode->netfs.inode); in afs_put_operation()
H A Dinternal.h698 struct netfs_inode netfs; /* Netfslib context and vfs inode */ member
749 return netfs_i_cookie(&vnode->netfs); in afs_vnode_cache()
759 vnode->netfs.cache = cookie; in afs_vnode_set_cache()
761 mapping_set_release_always(vnode->netfs.inode.i_mapping); in afs_vnode_set_cache()
982 i_size_read(&vnode->netfs.inode), flags); in afs_invalidate_cache()
1245 return afs_i2net(&vnode->netfs.inode); in afs_v2net()
1655 return container_of(inode, struct afs_vnode, netfs.inode); in AFS_FS_I()
1660 return &vnode->netfs.inode; in AFS_VNODE_TO_I()
1683 i_size_write(&vnode->netfs.inode, size); in afs_set_i_size()
1684 vnode->netfs.inode.i_blocks = ((size + 1023) >> 10) << 1; in afs_set_i_size()
H A Dfile.c196 i_size = i_size_read(&vnode->netfs.inode); in afs_release()
380 i_size = i_size_read(&vnode->netfs.inode); in afs_update_i_size()
382 i_size_write(&vnode->netfs.inode, new_i_size); in afs_update_i_size()
383 inode_set_bytes(&vnode->netfs.inode, new_i_size); in afs_update_i_size()
H A Ddir_silly.c134 ihold(&vnode->netfs.inode); in afs_sillyrename()
151 iput(&vnode->netfs.inode); in afs_sillyrename()
/linux/fs/smb/client/
H A Dfscache.c138 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 Dcifsfs.c401 cifs_inode->netfs.remote_i_size = 0; in cifs_alloc_inode()
418 return &cifs_inode->netfs.inode; in cifs_alloc_inode()
1295 if (fend > target_cifsi->netfs.zero_point) in cifs_remap_file_range()
1296 target_cifsi->netfs.zero_point = fend + 1; in cifs_remap_file_range()
1297 old_size = target_cifsi->netfs.remote_i_size; in cifs_remap_file_range()
1316 target_cifsi->netfs.zero_point = new_size; in cifs_remap_file_range()
1408 if (fend > target_cifsi->netfs.zero_point) in cifs_file_copychunk_range()
1409 target_cifsi->netfs.zero_point = fend + 1; in cifs_file_copychunk_range()
1423 netfs_resize_file(&target_cifsi->netfs, in cifs_file_copychunk_range()
1429 target_cifsi->netfs.zero_point = destoff + rc; in cifs_file_copychunk_range()
[all …]
H A Dfscache.h65 return netfs_i_cookie(&CIFS_I(inode)->netfs); in cifs_inode_cookie()
/linux/fs/9p/
H A 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()
H A 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()
/linux/Documentation/filesystems/caching/
H A 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
136 netfs using an iov_iter.
145 The netfs API to FS-Cache can be found in:
[all …]
H A Dindex.rst10 netfs-api
H A 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/fs/ceph/
H A 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()
H A Dcaps.c499 struct inode *inode = &ci->netfs.inode; in __cap_set_timeouts()
519 struct inode *inode = &ci->netfs.inode; in __cap_delay_requeue()
546 struct inode *inode = &ci->netfs.inode; in __cap_delay_requeue_front()
565 struct inode *inode = &ci->netfs.inode; in __cap_delay_cancel()
579 struct inode *inode = &ci->netfs.inode; in __check_cap_issue()
590 if (S_ISREG(ci->netfs.inode.i_mode) && in __check_cap_issue()
1003 ci->netfs.inode.i_data.nrpages)) in __ceph_caps_used()
1030 if (S_ISDIR(ci->netfs.inode.i_mode)) { in __ceph_caps_file_wanted()
1083 if (S_ISDIR(ci->netfs.inode.i_mode)) { in __ceph_caps_wanted()
4628 inode = igrab(&ci->netfs.inode); in ceph_check_delayed_caps()
[all …]
H A Dxattr.c60 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()
317 struct ceph_fs_client *fsc = ceph_sb_to_fs_client(ci->netfs.inode.i_sb); in ceph_vxattrcb_cluster_fsid()
325 struct ceph_fs_client *fsc = ceph_sb_to_fs_client(ci->netfs.inode.i_sb); in ceph_vxattrcb_client_id()
574 struct inode *inode = &ci->netfs.inode; in __set_xattr()
674 struct ceph_client *cl = ceph_inode_to_client(&ci->netfs.inode); in __get_xattr()
742 struct ceph_client *cl = ceph_inode_to_client(&ci->netfs.inode); in __copy_xattr_names()
766 struct ceph_client *cl = ceph_inode_to_client(&ci->netfs.inode); in __ceph_destroy_xattrs()
883 struct ceph_client *cl = ceph_inode_to_client(&ci->netfs.inode); in __get_required_blob_size()
[all …]
H A Dcache.h31 return netfs_i_cookie(&ci->netfs); in ceph_fscache_cookie()
/linux/Documentation/filesystems/
H A 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
197 The above fields are the ones the netfs can use. They are:
593 .. kernel-doc:: include/linux/netfs.h
594 .. kernel-doc:: fs/netfs/buffered_read.c
[all …]

123