diff options
Diffstat (limited to 'Documentation/filesystems')
| -rw-r--r-- | Documentation/filesystems/Locking | 8 | ||||
| -rw-r--r-- | Documentation/filesystems/caching/netfs-api.txt | 16 | ||||
| -rw-r--r-- | Documentation/filesystems/nilfs2.txt | 1 | ||||
| -rw-r--r-- | Documentation/filesystems/porting | 27 | ||||
| -rw-r--r-- | Documentation/filesystems/ubifs.txt | 28 | ||||
| -rw-r--r-- | Documentation/filesystems/vfs.txt | 30 | 
6 files changed, 69 insertions, 41 deletions
| diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 57d827d6071..ca7e2529254 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking @@ -52,7 +52,7 @@ ata *);  	void (*put_link) (struct dentry *, struct nameidata *, void *);  	void (*truncate) (struct inode *);  	int (*permission) (struct inode *, int, unsigned int); -	int (*check_acl)(struct inode *, int, unsigned int); +	int (*check_acl)(struct inode *, int);  	int (*setattr) (struct dentry *, struct iattr *);  	int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *);  	int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); @@ -412,7 +412,7 @@ prototypes:  	int (*open) (struct inode *, struct file *);  	int (*flush) (struct file *);  	int (*release) (struct inode *, struct file *); -	int (*fsync) (struct file *, int datasync); +	int (*fsync) (struct file *, loff_t start, loff_t end, int datasync);  	int (*aio_fsync) (struct kiocb *, int datasync);  	int (*fasync) (int, struct file *, int);  	int (*lock) (struct file *, int, struct file_lock *); @@ -438,9 +438,7 @@ prototypes:  locking rules:  	All may block except for ->setlease. -	No VFS locks held on entry except for ->fsync and ->setlease. - -->fsync() has i_mutex on inode. +	No VFS locks held on entry except for ->setlease.  ->setlease has the file_list_lock held and must not sleep. diff --git a/Documentation/filesystems/caching/netfs-api.txt b/Documentation/filesystems/caching/netfs-api.txt index a167ab876c3..7cc6bf2871e 100644 --- a/Documentation/filesystems/caching/netfs-api.txt +++ b/Documentation/filesystems/caching/netfs-api.txt @@ -673,6 +673,22 @@ storage request to complete, or it may attempt to cancel the storage request -  in which case the page will not be stored in the cache this time. +BULK INODE PAGE UNCACHE +----------------------- + +A convenience routine is provided to perform an uncache on all the pages +attached to an inode.  This assumes that the pages on the inode correspond on a +1:1 basis with the pages in the cache. + +	void fscache_uncache_all_inode_pages(struct fscache_cookie *cookie, +					     struct inode *inode); + +This takes the netfs cookie that the pages were cached with and the inode that +the pages are attached to.  This function will wait for pages to finish being +written to the cache and for the cache to finish with the page generally.  No +error is returned. + +  ==========================  INDEX AND DATA FILE UPDATE  ========================== diff --git a/Documentation/filesystems/nilfs2.txt b/Documentation/filesystems/nilfs2.txt index d5c0cef38a7..873a2ab2e9f 100644 --- a/Documentation/filesystems/nilfs2.txt +++ b/Documentation/filesystems/nilfs2.txt @@ -40,7 +40,6 @@ Features which NILFS2 does not support yet:  	- POSIX ACLs  	- quotas  	- fsck -	- resize  	- defragmentation  Mount options diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 6e29954851a..7f8861d341e 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting @@ -400,10 +400,31 @@ a file off.  --  [mandatory] - --- -[mandatory]  	->get_sb() is gone.  Switch to use of ->mount().  Typically it's just  a matter of switching from calling get_sb_... to mount_... and changing the  function type.  If you were doing it manually, just switch from setting ->mnt_root  to some pointer to returning that pointer.  On errors return ERR_PTR(...). + +-- +[mandatory] +	->permission(), generic_permission() and ->check_acl() have lost flags +argument; instead of passing IPERM_FLAG_RCU we add MAY_NOT_BLOCK into mask. +	generic_permission() has also lost the check_acl argument; if you want +non-NULL to be used for that inode, put it into ->i_op->check_acl. + +-- +[mandatory] +	If you implement your own ->llseek() you must handle SEEK_HOLE and +SEEK_DATA.  You can hanle this by returning -EINVAL, but it would be nicer to +support it in some way.  The generic handler assumes that the entire file is +data and there is a virtual hole at the end of the file.  So if the provided +offset is less than i_size and SEEK_DATA is specified, return the same offset. +If the above is true for the offset and you are given SEEK_HOLE, return the end +of the file.  If the offset is i_size or greater return -ENXIO in either case. + +[mandatory] +	If you have your own ->fsync() you must make sure to call +filemap_write_and_wait_range() so that all dirty pages are synced out properly. +You must also keep in mind that ->fsync() is not called with i_mutex held +anymore, so if you require i_mutex locking you must make sure to take it and +release it yourself. diff --git a/Documentation/filesystems/ubifs.txt b/Documentation/filesystems/ubifs.txt index 8e4fab639d9..a0a61d2f389 100644 --- a/Documentation/filesystems/ubifs.txt +++ b/Documentation/filesystems/ubifs.txt @@ -111,34 +111,6 @@ The following is an example of the kernel boot arguments to attach mtd0  to UBI and mount volume "rootfs":  ubi.mtd=0 root=ubi0:rootfs rootfstype=ubifs - -Module Parameters for Debugging -=============================== - -When UBIFS has been compiled with debugging enabled, there are 2 module -parameters that are available to control aspects of testing and debugging. - -debug_chks	Selects extra checks that UBIFS can do while running: - -		Check					Flag value - -		General checks				1 -		Check Tree Node Cache (TNC)		2 -		Check indexing tree size		4 -		Check orphan area			8 -		Check old indexing tree			16 -		Check LEB properties (lprops)		32 -		Check leaf nodes and inodes		64 - -debug_tsts	Selects a mode of testing, as follows: - -		Test mode				Flag value - -		Failure mode for recovery testing	4 - -For example, set debug_chks to 3 to enable general and TNC checks. - -  References  ========== diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 88b9f5519af..eff6617c9a0 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt @@ -229,6 +229,8 @@ struct super_operations {          ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);          ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); +	int (*nr_cached_objects)(struct super_block *); +	void (*free_cached_objects)(struct super_block *, int);  };  All methods are called without any locks being held, unless otherwise @@ -301,6 +303,26 @@ or bottom half).    quota_write: called by the VFS to write to filesystem quota file. +  nr_cached_objects: called by the sb cache shrinking function for the +	filesystem to return the number of freeable cached objects it contains. +	Optional. + +  free_cache_objects: called by the sb cache shrinking function for the +	filesystem to scan the number of objects indicated to try to free them. +	Optional, but any filesystem implementing this method needs to also +	implement ->nr_cached_objects for it to be called correctly. + +	We can't do anything with any errors that the filesystem might +	encountered, hence the void return type. This will never be called if +	the VM is trying to reclaim under GFP_NOFS conditions, hence this +	method does not need to handle that situation itself. + +	Implementations must include conditional reschedule calls inside any +	scanning loop that is done. This allows the VFS to determine +	appropriate scan batch sizes without having to worry about whether +	implementations will cause holdoff problems due to large scan batch +	sizes. +  Whoever sets up the inode is responsible for filling in the "i_op" field. This  is a pointer to a "struct inode_operations" which describes the methods that  can be performed on individual inodes. @@ -333,8 +355,8 @@ struct inode_operations {          void * (*follow_link) (struct dentry *, struct nameidata *);          void (*put_link) (struct dentry *, struct nameidata *, void *);  	void (*truncate) (struct inode *); -	int (*permission) (struct inode *, int, unsigned int); -	int (*check_acl)(struct inode *, int, unsigned int); +	int (*permission) (struct inode *, int); +	int (*check_acl)(struct inode *, int);  	int (*setattr) (struct dentry *, struct iattr *);  	int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);  	int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); @@ -423,7 +445,7 @@ otherwise noted.    permission: called by the VFS to check for access rights on a POSIX-like    	filesystem. -	May be called in rcu-walk mode (flags & IPERM_FLAG_RCU). If in rcu-walk +	May be called in rcu-walk mode (mask & MAY_NOT_BLOCK). If in rcu-walk          mode, the filesystem must check the permission without blocking or  	storing to the inode. @@ -755,7 +777,7 @@ struct file_operations {  	int (*open) (struct inode *, struct file *);  	int (*flush) (struct file *);  	int (*release) (struct inode *, struct file *); -	int (*fsync) (struct file *, int datasync); +	int (*fsync) (struct file *, loff_t, loff_t, int datasync);  	int (*aio_fsync) (struct kiocb *, int datasync);  	int (*fasync) (int, struct file *, int);  	int (*lock) (struct file *, int, struct file_lock *); | 
