Home
last modified time | relevance | path

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

12

/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 := \
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 DKconfig31 enabled by setting bits in /sys/module/netfs/parameters/debug.
/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
H A Dnetfs-api.rst366 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 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.c436 cifs_inode->netfs.inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */ in cifs_alloc_inode()
437 cifs_inode->netfs.remote_i_size = 0; in cifs_alloc_inode()
454 return &cifs_inode->netfs.inode; in cifs_alloc_inode()
1254 netfs_resize_file(&src_cifsi->netfs, src_end, true); in cifs_precopy_set_eof()
1350 if (src_cifsi->netfs.remote_i_size < off + len) { in cifs_remap_file_range()
1371 if (fend > target_cifsi->netfs.zero_point) in cifs_remap_file_range()
1372 target_cifsi->netfs.zero_point = fend + 1; in cifs_remap_file_range()
1373 old_size = target_cifsi->netfs.remote_i_size; in cifs_remap_file_range()
1405 if (rc == 0 && new_size > target_cifsi->netfs.zero_point) in cifs_remap_file_range()
1406 target_cifsi->netfs.zero_point = new_size; in cifs_remap_file_range()
[all …]
H A Dinode.c38 netfs_inode_init(&cifs_i->netfs, &cifs_req_ops, true); in cifs_set_netfs_context()
122 cifs_i->netfs.remote_i_size == fattr->cf_eof) { in cifs_revalidate_cache()
132 cifs_fscache_fill_coherency(&cifs_i->netfs.inode, &cd); in cifs_revalidate_cache()
177 CIFS_I(inode)->netfs.zero_point = fattr->cf_eof; in cifs_fattr_to_inode()
215 cifs_i->netfs.remote_i_size = fattr->cf_eof; in cifs_fattr_to_inode()
2775 cifs_inode->netfs.zero_point = cifs_inode->netfs.remote_i_size;
2973 struct cifs_sb_info *cifs_sb = CIFS_SB(cifs_i->netfs.inode.i_sb);
3088 netfs_resize_file(&cifsInode->netfs, size, true);
3243 netfs_resize_file(&cifsInode->netfs, attrs->ia_size, true);
3443 netfs_resize_file(&cifsInode->netfs, attrs->ia_size, true);
/linux/fs/afs/
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()
499 netfs_single_mark_inode_dirty(&vnode->netfs.inode); in afs_edit_dir_remove()
501 inode_set_iversion_raw(&vnode->netfs.inode, vnode->status.data_version); in afs_edit_dir_remove()
540 i_size = i_size_read(&vnode->netfs.inode); in afs_edit_dir_update()
582 netfs_single_mark_inode_dirty(&vnode->netfs.inode); in afs_edit_dir_update()
583 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()
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 Ddir_silly.c143 ihold(&vnode->netfs.inode); in afs_sillyrename()
160 iput(&vnode->netfs.inode); in afs_sillyrename()
H A Dsuper.c654 inode_init_once(&vnode->netfs.inode); in afs_i_init_once()
697 _leave(" = %p", &vnode->netfs.inode); in afs_alloc_inode()
698 return &vnode->netfs.inode; in afs_alloc_inode()
H A Dcallback.c33 unmap_mapping_pages(vnode->netfs.inode.i_mapping, 0, 0, false); in afs_invalidate_mmap_work()
/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.h140 struct netfs_inode netfs; /* Netfslib context and vfs inode */ member
148 return container_of(inode, struct v9fs_inode, netfs.inode); in V9FS_I()
154 return netfs_i_cookie(&v9inode->netfs); in v9fs_inode_cookie()
/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.c501 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 = &cap->ci->netfs.inode; in __cap_is_valid()
815 struct inode *inode = &ci->netfs.inode; in __ceph_caps_issued()
[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()
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()
881 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()
H A Dsnap.c533 struct inode *inode = &ci->netfs.inode; in ceph_queue_cap_snap()
665 struct inode *inode = &ci->netfs.inode; in __ceph_finish_cap_snap()
734 struct inode *inode = igrab(&ci->netfs.inode); in queue_realm_cap_snaps()
954 inode = &ci->netfs.inode; in flush_snaps()
/linux/fs/cachefiles/
H A DKconfig37 the data lies with the cachefiles backend instead of with the netfs

12