Lines Matching +full:async +full:- +full:enum
5 ---
16 ---
20 New methods: ->alloc_inode() and ->destroy_inode().
22 Remove inode->u.foo_inode_i
27 /* fs-private stuff */
35 Use FOO_I(inode) instead of &inode->u.foo_inode_i;
37 Add foo_alloc_inode() and foo_destroy_inode() - the former should allocate
38 foo_inode_info and return the address of ->vfs_inode, the latter should free
39 FOO_I(inode) (see in-tree filesystems for examples).
41 Make them ->alloc_inode and ->destroy_inode in your super_operations.
54 ---
58 Change of file_system_type method (->read_super to ->get_sb)
60 ->read_super() is no more. Ditto for DECLARE_FSTYPE and DECLARE_FSTYPE_DEV.
63 success and negative number in case of error (-EINVAL unless you have more
76 Replace DECLARE_FSTYPE... with explicit initializer and have ->get_sb set as
79 ---
83 Locking change: ->s_vfs_rename_sem is taken only by cross-directory renames.
85 global exclusion between renames for some internal purpose - you need to
89 ---
93 Now we have the exclusion between ->lookup() and directory removal (by
94 ->rmdir() and ->rename()). If you used to need that exclusion and do
95 it by internal locking (most of filesystems couldn't care less) - you
98 ---
102 ->lookup(), ->truncate(), ->create(), ->unlink(), ->mknod(), ->mkdir(),
103 ->rmdir(), ->link(), ->lseek(), ->symlink(), ->rename()
104 and ->readdir() are called without BKL now. Grab it on entry, drop upon return
105 - that will guarantee the same locking you used to have. If your method or its
106 parts do not need BKL - better yet, now you can shift lock_kernel() and
110 ---
117 ---
121 check for ->link() target not being a directory is done by callers. Feel
124 ---
128 ->link() callers hold ->i_mutex on the object we are linking to. Some of your
131 ---
135 new file_system_type method - kill_sb(superblock). If you are converting
136 an existing filesystem, set it according to ->fs_flags::
138 FS_REQUIRES_DEV - kill_block_super
139 FS_LITTER - kill_litter_super
140 neither - kill_anon_super
142 FS_LITTER is gone - just remove it from fs_flags.
144 ---
148 FS_SINGLE is gone (actually, that had happened back when ->get_sb()
149 went in - and hadn't been documented ;-/). Just remove it from fs_flags
150 (and see ->get_sb() entry for other actions).
152 ---
156 ->setattr() is called without BKL now. Caller _always_ holds ->i_mutex, so
157 watch for ->i_mutex-grabbing code that might be used by your ->setattr().
158 Callers of notify_change() need ->i_mutex now.
160 ---
171 a standard helper function for decode_fh, and provide file-system specific
183 ---
197 should be a non-blocking function that initializes those parts of a
214 if (inode->i_state & I_NEW) {
227 ---
231 ->getattr() finally getting used. See instances in nfs, minix, etc.
233 ---
237 ->revalidate() is gone. If your filesystem had it - provide ->getattr()
238 and let it call whatever you had as ->revlidate() + (for symlinks that
239 had ->revalidate()) add calls in ->follow_link()/->readlink().
241 ---
245 ->d_parent changes are not protected by BKL anymore. Read access is safe
248 * filesystem has no cross-directory rename()
250 ->d_parent of ->lookup() argument).
251 * we are called from ->rename().
252 * the child's ->d_lock is held
255 not protected by the conditions above is risky even in the old tree - you
257 a few holes of that kind - unprotected access to ->d_parent leading to
260 ---
264 FS_NOMOUNT is gone. If you use it - just set SB_NOUSER in flags
267 ---
275 ---
279 ->permission() is called without BKL now. Grab it on entry, drop upon
280 return - that will guarantee the same locking you used to have. If
281 your method or its parts do not need BKL - better yet, now you can
285 ---
289 ->statfs() is now called without BKL held. BKL should have been
293 ---
299 ---
305 ---
316 block truncatation on error exit from ->write_begin, and ->direct_IO
323 ->truncate is gone. The whole truncate sequence needs to be
324 implemented in ->setattr, which is now mandatory for filesystems
325 implementing on-disk size changes. Start with a copy of the old inode_setattr
328 size update and on finally on-disk truncation which should not fail.
330 for ATTR_SIZE and must be called in the beginning of ->setattr unconditionally.
334 ->clear_inode() and ->delete_inode() are gone; ->evict_inode() should
336 remaining links or not. Caller does *not* evict the pagecache or inode-associated
338 of those. Caller makes sure async writeback cannot be running for the inode while
339 (or after) ->evict_inode() is called.
341 ->drop_inode() returns int now; it's called on final iput() with
342 inode->i_lock held and it returns true if filesystems wants the inode to be
346 ->drop_inode() returns.
349 ->evict_inode() (as it used to be for each call of ->delete_inode()). Unlike
350 before, if you are using inode-associated metadata buffers (i.e.
354 NOTE: checking i_nlink in the beginning of ->write_inode() and bailing out
356 may happen while the inode is in the middle of ->write_inode(); e.g. if you blindly
357 free the on-disk inode, you may end up doing that while ->write_inode() is writing
360 ---
369 ---
377 ---
385 ---
391 particular things. Most of the time, a filesystem only needs ->d_lock, which
394 ---
398 Filesystems must RCU-free their inodes, if they can have been accessed
399 via rcu-walk path walk (basically, if the file can have had a path name in the
407 ---
411 vfs now tries to do path walking in "rcu-walk mode", which avoids
413 Documentation/filesystems/path-lookup.txt). d_hash and d_compare changes
415 filesystem callbacks, the vfs drops out of rcu-walk mode before the fs call, so
417 the benefits of rcu-walk mode. We will begin to add filesystem callbacks that
418 are rcu-walk aware, shown below. Filesystems should take advantage of this
421 ---
426 the filesystem provides it), which requires dropping out of rcu-walk mode. This
427 may now be called in rcu-walk mode (nd->flags & LOOKUP_RCU). -ECHILD should be
428 returned if the filesystem cannot handle rcu-walk. See
433 must now be rcu-walk aware (mask & MAY_NOT_BLOCK). See
436 ---
440 In ->fallocate() you must check the mode option passed in. If your
442 file) you must return -EOPNOTSUPP if FALLOC_FL_PUNCH_HOLE is set in mode.
447 ---
451 ->get_sb() is gone. Switch to use of ->mount(). Typically it's just
454 ->mnt_root to some pointer to returning that pointer. On errors return
457 ---
461 ->permission() and generic_permission()have lost flags
465 has been taken to VFS and filesystems need to provide a non-NULL
466 ->i_op->get_inode_acl to read an ACL from disk.
468 ---
472 If you implement your own ->llseek() you must handle SEEK_HOLE and
473 SEEK_DATA. You can handle this by returning -EINVAL, but it would be nicer to
478 of the file. If the offset is i_size or greater return -ENXIO in either case.
482 If you have your own ->fsync() you must make sure to call
484 You must also keep in mind that ->fsync() is not called with i_mutex held
488 ---
501 s->s_root = d_make_root(inode);
502 if (!s->s_root)
504 return -ENOMEM;
507 ---
511 The witch is dead! Well, 2/3 of it, anyway. ->d_revalidate() and
512 ->lookup() do *not* take struct nameidata anymore; just the flags.
514 ---
518 ->create() doesn't take ``struct nameidata *``; unlike the previous
520 local filesystems can ignore this argument - they are guaranteed that the
523 ---
527 FS_REVAL_DOT is gone; if you used to have it, add ->d_weak_revalidate()
530 ---
536 ---
540 ->readdir() is gone now; switch to ->iterate_shared()
545 from ->follow_link for normal symlinks, or nd_jump_link for magic
548 ---
553 called with both ->i_lock and inode_hash_lock held; the former is *not*
555 of the in-tree instances did). inode_hash_lock is still held,
559 ---
564 need now. Remember that they have opposite orders of arguments ;-/
566 ---
573 ---
577 never call ->read() and ->write() directly; use __vfs_{read,write} or
578 wrappers; instead of checking for ->write or ->read being NULL, look for
579 FMODE_CAN_{WRITE,READ} in file->f_mode.
581 ---
585 do _not_ use new_sync_{read,write} for ->read/->write; leave it NULL
588 ---
591 ->aio_read/->aio_write are gone. Use ->read_iter/->write_iter.
593 ---
597 for embedded ("fast") symlinks just set inode->i_link to wherever the
598 symlink body is and use simple_follow_link() as ->follow_link().
600 ---
604 calling conventions for ->follow_link() have changed. Instead of returning
607 nameidata isn't passed at all - nd_jump_link() doesn't need it and
610 ---
614 calling conventions for ->put_link() have changed. It gets inode instead of
616 is non-NULL. Note that link body isn't available anymore, so if you need it,
619 ---
631 ---
635 ->follow_link() is replaced with ->get_link(); same API, except that
637 * ->get_link() gets inode as a separate argument
638 * ->get_link() may be called in RCU mode - in that case NULL
641 ---
645 ->get_link() gets struct delayed_call ``*done`` now, and should do
648 ->put_link() is gone - just give the destructor to set_delayed_call()
649 in ->get_link().
651 ---
655 ->getxattr() and xattr_handler.get() get dentry and inode passed separately.
656 dentry might be yet to be attached to inode, so do _not_ use its ->d_inode
660 ---
666 assume that non-NULL value in ->i_nlink at ->destroy_inode() implies that
667 it's a symlink. Checking ->i_mode is really needed now. In-tree we had
671 ---
675 ->i_mutex is replaced with ->i_rwsem now. inode_lock() et.al. work as
676 they used to - they just take it exclusive. However, ->lookup() may be
679 * use d_instantiate) and d_rehash() separately - use d_add() or
681 * use d_rehash() alone - call d_add(new_dentry, NULL) instead.
682 * in the unlikely case when (read-only) access to filesystem
684 yourself. None of the in-tree filesystems needed that.
685 * rely on ->d_parent and ->d_name not changing after dentry has
687 in-tree instances relied upon that.
690 will not happen in parallel ("same" in the sense of your ->d_compare()).
694 ---
698 ->iterate_shared() is added.
702 Exclusion between that method and all directory-modifying ones is
705 If you have any per-inode or per-dentry in-core data structures modified
706 by ->iterate_shared(), you might need something to serialize the access
707 to them. If you do dcache pre-seeding, you'll need to switch to
708 d_alloc_parallel() for that; look for in-tree examples.
710 ---
714 ->atomic_open() calls without O_CREAT may happen in parallel.
716 ---
720 ->setxattr() and xattr_handler.set() get dentry and inode passed separately.
723 dentry might be yet to be attached to inode, so do _not_ use its ->d_inode
726 ->d_instantiate() uses not just ->getxattr() but ->setxattr() as well.
728 ---
732 ->d_compare() doesn't get parent as a separate argument anymore. If you
733 used it for finding the struct super_block involved, dentry->d_sb will
734 work just as well; if it's something more complicated, use dentry->d_parent.
736 the same value - in RCU mode it could change under you.
738 ---
742 ->rename() has an added flags argument. Any flags not handled by the
745 ---
750 ->readlink is optional for symlinks. Don't set, unless filesystem needs
753 ---
757 ->getattr() is now passed a struct path rather than a vfsmount and
760 supporting any statx-specific features may ignore the new arguments.
762 ---
766 ->atomic_open() calling conventions have changed. Gone is ``int *opened``,
768 FMODE_OPENED/FMODE_CREATED, set in file->f_mode. Additionally, return
771 does not need any changes in ->atomic_open() instances.
773 ---
786 original, on failure - ERR_PTR().
788 ---
792 ->clone_file_range() and ->dedupe_file_range have been replaced with
793 ->remap_file_range(). See Documentation/filesystems/vfs.rst for more
796 ---
800 ->lookup() instances doing an equivalent of::
806 don't need to bother with the check - d_splice_alias() will do the
812 ---
816 take the RCU-delayed parts of ->destroy_inode() into a new method -
817 ->free_inode(). If ->destroy_inode() becomes empty - all the better,
820 stack trace) *might* be movable to ->evict_inode(); however,
822 done by ->alloc_inode(). IOW, if it's cleaning up the stuff that
823 might have accumulated over the life of in-core inode, ->evict_inode()
828 * if ->destroy_inode() is non-NULL, it gets called
829 * if ->free_inode() is non-NULL, it gets scheduled by call_rcu()
830 * combination of NULL ->destroy_inode and NULL ->free_inode is
833 Note that the callback (be it via ->free_inode() or explicit call_rcu()
834 in ->destroy_inode()) is *NOT* ordered wrt superblock destruction;
841 ---
849 ---
853 d_alloc_pseudo() is internal-only; uses outside of alloc_file_pseudo() are
857 ---
862 failure exits in ->atomic_open() instances should *NOT* fput() the file,
865 ---
872 ---
876 zero-length bvec segments are disallowed, they must be filtered out before
879 ---
884 uses the one provided. Anyone issuing kiocb-I/O should ensure that the bvec and
885 page references stay until I/O has completed, i.e. until ->ki_complete() has
886 been called or returned with non -EIOCBQUEUED code.
888 ---
895 ---
904 ---
910 pass <mnt, mnt->mnt_root> pair (i.e. the root of given mount), a new helper
911 is provided - file_open_root_mnt(). In-tree users adjusted.
913 ---
917 no_llseek is gone; don't set .llseek to that - just leave it NULL instead.
919 should be done by looking at FMODE_LSEEK in file->f_mode.
921 ---
926 returning 0 or -E... it returns bool now. false means "no more" (as -E... used
927 to) and true - "keep going" (as 0 in old calling conventions). Rationale:
928 callers never looked at specific -E... values anyway. -> iterate_shared()
932 ---
936 Calling conventions for ->tmpfile() have changed. It now takes a struct
938 changed to simplify callers. The passed file is in a non-open state and on
942 ---
946 Calling convention for ->huge_fault has changed. It now takes a page
947 order instead of an enum page_entry_size, and it may be called without the
948 mmap_lock held. All in-tree users have been audited and do not seem to
953 ---
976 would spin. Instead they are now made to wait using an explicit wait-wake
979 ---
1023 ->kill_sb(). Removal of the superblock from the list of superblocks of the
1028 the superblock and all devices are shutdown in ->kill_sb(). If the
1034 devices are shut down in ->kill_sb() and the superblock is removed from the
1041 ->kill_sb(). In other words, if the superblock isn't on the list of
1049 ---
1056 ---
1060 export_operations ->encode_fh() no longer has a default implementation to
1065 ---
1069 If ->rename() update of .. on cross-directory move needs an exclusion with
1071 ->rename() - it's done by the caller now [that item should've been added in
1074 ---
1078 On same-directory ->rename() the (tautological) update of .. is not protected
1080 We really can't lock two subdirectories in same-directory rename - not without
1083 ---
1087 lock_rename() and lock_rename_child() may fail in cross-directory case, if
1088 their arguments do not have a common ancestor. In that case ERR_PTR(-EXDEV)
1089 is returned, with no locks taken. In-tree users updated; out-of-tree ones
1092 ---
1097 Field names got changed (->d_children/->d_sib instead of ->d_subdirs/->d_child
1101 ---
1105 ->d_delete() instances are now called for dentries with ->d_lock held
1106 and refcount equal to 0. They are not permitted to drop/regain ->d_lock.
1107 None of in-tree instances did anything of that sort. Make sure yours do not...
1109 ---
1113 ->d_prune() instances are now called without ->d_lock held on the parent.
1114 ->d_lock on dentry itself is still held; if you need per-parent exclusions (none
1115 of the in-tree instances did), use your own spinlock.
1117 ->d_iput() and ->d_release() are called with victim dentry still in the
1119 removed from parent's ->d_children yet.
1122 half-killed dentries that might be seen there; taking ->d_lock on those will
1124 of the in-kernel users would've done the right thing anyway without any adjustment.
1126 ---
1133 superblock of the main block device, i.e., the one stored in sb->s_bdev. Block
1138 ---