Home
last modified time | relevance | path

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

123

/linux/fs/nfs/
H A Dfscache.c289 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 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
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 DMakefile3 netfs-y := \
21 netfs-$(CONFIG_NETFS_PGPRIV2) += read_pgpriv2.o
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 Dsymlink.c66 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 Dinode.c57 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 Ddir_edit.c125 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 Dvalidation.c376 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 Ddir.c104 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 Dwrite.c145 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 Ddir_search.c42 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 Dfs_operation.c343 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 Ddynroot.c68 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 Dinternal.h690 struct netfs_inode netfs; /* Netfslib context and vfs inode */ member
745 return netfs_i_cookie(&vnode->netfs); in afs_vnode_cache()
755 vnode->netfs.cache = cookie; in afs_vnode_set_cache()
987 i_size_read(&vnode->netfs.inode), flags); in afs_invalidate_cache()
1305 return afs_i2net(&vnode->netfs.inode); in afs_v2net()
1768 return container_of(inode, struct afs_vnode, netfs.inode); in AFS_FS_I()
1773 return &vnode->netfs.inode; in AFS_VNODE_TO_I()
H A Dsuper.c655 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 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 …]
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/smb/client/
H A Dfscache.c134 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()
H A Dcifsfs.c421 * Wait for all in-flight netfs I/O requests and oplock breaks
562 cifs_inode->netfs.inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */ in cifs_show_cache_flavor()
563 cifs_inode->netfs._remote_i_size = 0; in cifs_show_cache_flavor()
564 cifs_inode->netfs._zero_point = 0; in cifs_show_cache_flavor()
580 return &cifs_inode->netfs.inode; in cifs_show_devname()
1442 netfs_resize_file(&src_cifsi->netfs, src_end, true); in cifs_remap_file_range()
1574 if (fend > target_cifsi->netfs._zero_point) in cifs_file_copychunk_range()
1612 if (new_size > target_cifsi->netfs._zero_point) in cifs_file_copychunk_range()
1736 netfs_resize_file(&target_cifsi->netfs,
1743 if (destoff + rc > target_cifsi->netfs
[all...]
/linux/fs/9p/
H A Dcache.c62 v9inode->netfs.cache = in v9fs_cache_inode_get_cookie()
67 i_size_read(&v9inode->netfs.inode)); in v9fs_cache_inode_get_cookie()
68 if (v9inode->netfs.cache) in v9fs_cache_inode_get_cookie()
H A Dv9fs.h12 #include <linux/netfs.h>
159 struct netfs_inode netfs; /* Netfslib context and vfs inode */
167 return container_of(inode, struct v9fs_inode, netfs.inode); in v9fs_inode_cookie()
173 return netfs_i_cookie(&v9inode->netfs); in v9fs_session_cache()
149 struct netfs_inode netfs; /* Netfslib context and vfs inode */ global() member
/linux/fs/ceph/
H A Dcache.c33 WARN_ON_ONCE(ci->netfs.cache); in ceph_fscache_register_inode_cookie()
36 ci->netfs.cache = in ceph_fscache_register_inode_cookie()
41 if (ci->netfs.cache) in ceph_fscache_register_inode_cookie()
H A Dcaps.c501 struct inode *inode = &ci->netfs.inode; in __cap_set_timeouts()
521 struct inode *inode = &ci->netfs.inode; in __cap_delay_requeue()
552 struct inode *inode = &ci->netfs.inode; in __cap_delay_requeue_front()
584 struct inode *inode = &ci->netfs.inode; in __check_cap_issue()
603 struct inode *inode = &ci->netfs.inode; in __check_cap_issue()
617 struct inode *inode = &ci->netfs.inode; in __check_cap_issue()
628 if (S_ISREG(ci->netfs.inode.i_mode) && in change_auth_cap_ses()
643 if (S_ISDIR(ci->netfs.inode.i_mode)) {
650 if (S_ISDIR(ci->netfs.inode.i_mode) && (had & CEPH_CAP_DIR_CREATE) &&
826 struct inode *inode = &ci->netfs in __ceph_caps_issued()
[all...]
H A Dxattr.c61 struct ceph_fs_client *fsc = ceph_sb_to_fs_client(ci->netfs.inode.i_sb); in ceph_vxattrcb_layout()
74 doutc(cl, "%p\n", &ci->netfs.inode); in ceph_vxattrcb_layout()
166 struct ceph_fs_client *fsc = ceph_sb_to_fs_client(ci->netfs.inode.i_sb); in ceph_vxattrcb_layout_pool()
274 !ceph_in_snap(&ci->netfs.inode) && in ceph_vxattrcb_quota_exists()
276 ci->i_snap_realm->ino == ceph_ino(&ci->netfs.inode)) in ceph_vxattrcb_quota_exists()
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()
573 struct inode *inode = &ci->netfs.inode; in __set_xattr()
673 struct ceph_client *cl = ceph_inode_to_client(&ci->netfs.inode); in __get_xattr()
741 struct ceph_client *cl = ceph_inode_to_client(&ci->netfs in __copy_xattr_names()
[all...]
H A Dcache.h31 return netfs_i_cookie(&ci->netfs); in ceph_fscache_cookie()

123