aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems/porting
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/filesystems/porting')
-rw-r--r--Documentation/filesystems/porting28
1 files changed, 25 insertions, 3 deletions
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 6e29954851a2..b4a3d765ff9a 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -400,10 +400,32 @@ a file off.
400 400
401-- 401--
402[mandatory] 402[mandatory]
403
404--
405[mandatory]
406 ->get_sb() is gone. Switch to use of ->mount(). Typically it's just 403 ->get_sb() is gone. Switch to use of ->mount(). Typically it's just
407a matter of switching from calling get_sb_... to mount_... and changing the 404a matter of switching from calling get_sb_... to mount_... and changing the
408function type. If you were doing it manually, just switch from setting ->mnt_root 405function type. If you were doing it manually, just switch from setting ->mnt_root
409to some pointer to returning that pointer. On errors return ERR_PTR(...). 406to some pointer to returning that pointer. On errors return ERR_PTR(...).
407
408--
409[mandatory]
410 ->permission() and generic_permission()have lost flags
411argument; instead of passing IPERM_FLAG_RCU we add MAY_NOT_BLOCK into mask.
412 generic_permission() has also lost the check_acl argument; ACL checking
413has been taken to VFS and filesystems need to provide a non-NULL ->i_op->get_acl
414to read an ACL from disk.
415
416--
417[mandatory]
418 If you implement your own ->llseek() you must handle SEEK_HOLE and
419SEEK_DATA. You can hanle this by returning -EINVAL, but it would be nicer to
420support it in some way. The generic handler assumes that the entire file is
421data and there is a virtual hole at the end of the file. So if the provided
422offset is less than i_size and SEEK_DATA is specified, return the same offset.
423If the above is true for the offset and you are given SEEK_HOLE, return the end
424of the file. If the offset is i_size or greater return -ENXIO in either case.
425
426[mandatory]
427 If you have your own ->fsync() you must make sure to call
428filemap_write_and_wait_range() so that all dirty pages are synced out properly.
429You must also keep in mind that ->fsync() is not called with i_mutex held
430anymore, so if you require i_mutex locking you must make sure to take it and
431release it yourself.