diff options
Diffstat (limited to 'Documentation/filesystems/porting')
-rw-r--r-- | Documentation/filesystems/porting | 28 |
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 |
407 | a matter of switching from calling get_sb_... to mount_... and changing the | 404 | a matter of switching from calling get_sb_... to mount_... and changing the |
408 | function type. If you were doing it manually, just switch from setting ->mnt_root | 405 | function type. If you were doing it manually, just switch from setting ->mnt_root |
409 | to some pointer to returning that pointer. On errors return ERR_PTR(...). | 406 | to some pointer to returning that pointer. On errors return ERR_PTR(...). |
407 | |||
408 | -- | ||
409 | [mandatory] | ||
410 | ->permission() and generic_permission()have lost flags | ||
411 | argument; 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 | ||
413 | has been taken to VFS and filesystems need to provide a non-NULL ->i_op->get_acl | ||
414 | to read an ACL from disk. | ||
415 | |||
416 | -- | ||
417 | [mandatory] | ||
418 | If you implement your own ->llseek() you must handle SEEK_HOLE and | ||
419 | SEEK_DATA. You can hanle this by returning -EINVAL, but it would be nicer to | ||
420 | support it in some way. The generic handler assumes that the entire file is | ||
421 | data and there is a virtual hole at the end of the file. So if the provided | ||
422 | offset is less than i_size and SEEK_DATA is specified, return the same offset. | ||
423 | If the above is true for the offset and you are given SEEK_HOLE, return the end | ||
424 | of 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 | ||
428 | filemap_write_and_wait_range() so that all dirty pages are synced out properly. | ||
429 | You must also keep in mind that ->fsync() is not called with i_mutex held | ||
430 | anymore, so if you require i_mutex locking you must make sure to take it and | ||
431 | release it yourself. | ||