VFS: Rename do_fallocate() to vfs_fallocate()
Subsystems (7)
PATCH 1/1 VFS: Rename do_fallocate() to vfs_fallocate()
From: Anna Schumaker <[email protected]>
This function needs to be exported so it can be used by the NFSD module when responding to the new ALLOCATE and DEALLOCATE operations in NFS v4.2. Christoph Hellwig suggested renaming the function to stay consistent with how other vfs functions are named.
--- drivers/staging/android/ashmem.c | 2 +- fs/ioctl.c | 2 +- fs/open.c | 5 +++-- include/linux/fs.h | 2 +- mm/madvise.c | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-)
drivers/staging/android/ashmem.c +1 -1
@@ -446,7 +446,7 @@ ashmem_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)loff_t start = range->pgstart *PAGE_SIZE ;loff_t end = (range->pgend +1 ) *PAGE_SIZE ; -do_fallocate (range->asma->file, +vfs_fallocate (range->asma->file,FALLOC_FL_PUNCH_HOLE |FALLOC_FL_KEEP_SIZE , start, end - start); range->purged =ASHMEM_WAS_PURGED ;
fs/ioctl.c +1 -1
@@ -443,7 +443,7 @@ int ioctl_preallocate(struct file *filp, void __user *argp)return -EINVAL ; } -return do_fallocate (filp,FALLOC_FL_KEEP_SIZE , sr.l_start, sr.l_len); +return vfs_fallocate (filp,FALLOC_FL_KEEP_SIZE , sr.l_start, sr.l_len); } static int file_ioctl(struct file *filp, unsigned int cmd,
fs/open.c +3 -2
@@ -222,7 +222,7 @@ SYSCALL_DEFINE2(ftruncate64, unsigned int, fd, loff_t, length)#endif /* BITS_PER_LONG == 32 */ -int do_fallocate (struct file *file,int mode,loff_t offset,loff_t len) +int vfs_fallocate (struct file *file,int mode,loff_t offset,loff_t len) {struct inode *inode =file_inode (file);long ret;
@@ -298,6 +298,7 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len)sb_end_write (inode->i_sb);return ret; } +EXPORT_SYMBOL_GPL (vfs_fallocate); SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len) {
@@ -305,7 +306,7 @@ SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len)int error = -EBADF ;if (f.file) { - error =do_fallocate (f.file, mode, offset, len); + error =vfs_fallocate (f.file, mode, offset, len);fdput (f); }return error;
include/linux/fs.h +1 -1
@@ -2049,7 +2049,7 @@ struct filename {extern long vfs_truncate (struct path *,loff_t );extern int do_truncate (struct dentry *,loff_t start,unsigned int time_attrs,struct file *filp); -extern int do_fallocate (struct file *file,int mode,loff_t offset, +extern int vfs_fallocate (struct file *file,int mode,loff_t offset,loff_t len);extern long do_sys_open (int dfd,const char __user *filename,int flags,umode_t mode);
mm/madvise.c +1 -1
@@ -326,7 +326,7 @@ static long madvise_remove(struct vm_area_struct *vma,*/ get_file (f);up_read (¤t->mm->mmap_sem); - error =do_fallocate (f, + error =vfs_fallocate (f,FALLOC_FL_PUNCH_HOLE |FALLOC_FL_KEEP_SIZE , offset, end - start);fput (f);
Signature · 1 line
2.1.1
A message that is not in the archive (sent off-list or not yet received): 1412190907-30307-1-git-send-email-Anna.Schumaker-ZwjVKphTwtPQT0dZR+AlfA@public.gmane.org
Quoted 6 lines · Anna Schumaker
From: Anna Schumaker <[email protected]>
This function needs to be exported so it can be used by the NFSD module when responding to the new ALLOCATE and DEALLOCATE operations in NFS v4.2. Christoph Hellwig suggested renaming the function to stay consistent with how other vfs functions are named.
ALLOCATE/DEALLOCATE have already gotten some review and look close to done, so will probably be in 3.19, and having this in now would simplify merging--ACK.
--b.
Quoted 95 lines
Signed-off-by Anna Schumaker <[email protected]>--- drivers/staging/android/ashmem.c | 2 +- fs/ioctl.c | 2 +- fs/open.c | 5 +++-- include/linux/fs.h | 2 +- mm/madvise.c | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-)drivers/staging/android/ashmem.c +1
-1@@ -446,7 +446,7 @@ ashmem_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)loff_t start = range->pgstart *PAGE_SIZE ;loff_t end = (range->pgend +1 ) *PAGE_SIZE ; -do_fallocate (range->asma->file, +vfs_fallocate (range->asma->file,FALLOC_FL_PUNCH_HOLE |FALLOC_FL_KEEP_SIZE , start, end - start); range->purged =ASHMEM_WAS_PURGED ;fs/ioctl.c +1
-1@@ -443,7 +443,7 @@ int ioctl_preallocate(struct file *filp, void __user *argp)return -EINVAL ; } -return do_fallocate (filp,FALLOC_FL_KEEP_SIZE , sr.l_start, sr.l_len); +return vfs_fallocate (filp,FALLOC_FL_KEEP_SIZE , sr.l_start, sr.l_len); } static int file_ioctl(struct file *filp, unsigned int cmd,fs/open.c +3
-2@@ -222,7 +222,7 @@ SYSCALL_DEFINE2(ftruncate64, unsigned int, fd, loff_t, length)#endif /* BITS_PER_LONG == 32 */ -int do_fallocate (struct file *file,int mode,loff_t offset,loff_t len) +int vfs_fallocate (struct file *file,int mode,loff_t offset,loff_t len) {struct inode *inode =file_inode (file);long ret;@@ -298,6 +298,7 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len)sb_end_write (inode->i_sb);return ret; } +EXPORT_SYMBOL_GPL (vfs_fallocate); SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len) {@@ -305,7 +306,7 @@ SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len)int error = -EBADF ;if (f.file) { - error =do_fallocate (f.file, mode, offset, len); + error =vfs_fallocate (f.file, mode, offset, len);fdput (f); }return error;include/linux/fs.h +1
-1@@ -2049,7 +2049,7 @@ struct filename {extern long vfs_truncate (struct path *,loff_t );extern int do_truncate (struct dentry *,loff_t start,unsigned int time_attrs,struct file *filp); -extern int do_fallocate (struct file *file,int mode,loff_t offset, +extern int vfs_fallocate (struct file *file,int mode,loff_t offset,loff_t len);extern long do_sys_open (int dfd,const char __user *filename,int flags,umode_t mode);mm/madvise.c +1
-1@@ -326,7 +326,7 @@ static long madvise_remove(struct vm_area_struct *vma,*/ get_file (f);up_read (¤t->mm->mmap_sem); - error =do_fallocate (f, + error =vfs_fallocate (f,FALLOC_FL_PUNCH_HOLE |FALLOC_FL_KEEP_SIZE , offset, end - start);fput (f);Signature · 1 line
2.1.1
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Anna Schumaker
From: Anna Schumaker <[email protected]>
This function needs to be exported so it can be used by the NFSD module when responding to the new ALLOCATE and DEALLOCATE operations in NFS v4.2. Christoph Hellwig suggested renaming the function to stay consistent with how other vfs functions are named.
Signed-off-by Anna Schumaker <[email protected]>
A message that is not in the archive (sent off-list or not yet received): [email protected]
I'm curious what the status of this patch is?
Thanks,
Anna
Quoted 12 lines · Christoph Hellwig
Quoted 8 lines · Anna Schumaker
From: Anna Schumaker <[email protected]>
This function needs to be exported so it can be used by the NFSD module when responding to the new ALLOCATE and DEALLOCATE operations in NFS v4.2. Christoph Hellwig suggested renaming the function to stay consistent with how other vfs functions are named.
Signed-off-by Anna Schumaker <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 1 line · Anna Schumaker
I'm curious what the status of this patch is?
Looks like nothing :)
Al, are you ok with Anna just submitting this via the nfsd tree for the NFS fallocate support?
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · Christoph Hellwig
Quoted 1 line · Anna Schumaker
I'm curious what the status of this patch is?
Looks like nothing :)
Al, are you ok with Anna just submitting this via the nfsd tree for the NFS fallocate support?
Fine by me.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html