28 Sep, 2009
1 commit
-
* mark struct vm_area_struct::vm_ops as const
* mark vm_ops in AGP codeBut leave TTM code alone, something is fishy there with global vm_ops
being used.Signed-off-by: Alexey Dobriyan
Signed-off-by: Linus Torvalds
24 Sep, 2009
1 commit
-
Update some fs code to make use of new helper functions introduced
in the previous patch. Should be no significant change in behaviour
(except CIFS now calls send_sig under i_lock, via inode_newsize_ok).Reviewed-by: Christoph Hellwig
Acked-by: Miklos Szeredi
Cc: linux-nfs@vger.kernel.org
Cc: Trond.Myklebust@netapp.com
Cc: linux-cifs-client@lists.samba.org
Cc: sfrench@samba.org
Signed-off-by: Nick Piggin
Signed-off-by: Al Viro
19 Sep, 2009
1 commit
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
fuse: add fusectl interface to max_background
fuse: limit user-specified values of max background requests
fuse: use drop_nlink() instead of direct nlink manipulation
fuse: document protocol version negotiation
fuse: make the number of max background requests and congestion threshold tunable
16 Sep, 2009
4 commits
-
We do this automatically in get_sb_bdev() from the set_bdev_super()
callback. Filesystems that have their own private backing_dev_info
must assign that in ->fill_super().Note that ->s_bdi assignment is required for proper writeback!
Acked-by: Christoph Hellwig
Signed-off-by: Jens Axboe -
Make the max_background and congestion_threshold parameters of a FUSE
mount tunable at runtime by adding the respective knobs to its directory
within the fusectl filesystem.Signed-off-by: Csaba Henk
Signed-off-by: Miklos Szeredi -
An untrusted user could DoS the system if s/he were allowed to accumulate an
arbitrary number of pending background requests by setting the above limits
to extremely high values in INIT. This patch excludes this possibility by
imposing global upper limits on the possible values of per-mount "max
background requests" and "congestion threshold" parameters for unprivileged
FUSE filesystems.These global limits are implemented as module parameters.
Signed-off-by: Csaba Henk
Signed-off-by: Miklos Szeredi -
drop_nlink() is the API function to decrease the link count of an inode.
However, at a place the control filesystem used the decrement operator
on i_nlink directly. Fix this.Cc: Anand Avati
Signed-off-by: Csaba Henk
Signed-off-by: Miklos Szeredi
11 Sep, 2009
1 commit
-
This enables us to track who does what and print info. Its main use
is catching dirty inodes on the default_backing_dev_info, so we can
fix that up.Signed-off-by: Jens Axboe
12 Jul, 2009
1 commit
-
This reverts commit 097041e576ee3a50d92dd643ee8ca65bf6a62e21.
Trond had a better fix, which is the parent of this one ("Fix compile
error due to congestion_wait() changes")Requested-by: Trond Myklebust
Acked-by: Larry Finger
Signed-off-by: Linus Torvalds
11 Jul, 2009
2 commits
-
When building v2.6.31-rc2-344-g69ca06c, the following build errors are
found due to missing includes:CC [M] fs/fuse/dev.o
fs/fuse/dev.c: In function ‘request_end’:
fs/fuse/dev.c:289: error: ‘BLK_RW_SYNC’ undeclared (first use in this function)
...
fs/nfs/write.c: In function ‘nfs_set_page_writeback’:
fs/nfs/write.c:207: error: ‘BLK_RW_ASYNC’ undeclared (first use in this function)Signed-off-by: Larry Finger@lwfinger.net>
Signed-off-by: Linus Torvalds -
Commit 1faa16d22877f4839bd433547d770c676d1d964c accidentally broke
the bdi congestion wait queue logic, causing us to wait on congestion
for WRITE (== 1) when we really wanted BLK_RW_ASYNC (== 0) instead.Signed-off-by: Jens Axboe
07 Jul, 2009
1 commit
-
The practical values for these limits depend on the design of the
filesystem server so let userspace set them at initialization time.Signed-off-by: Csaba Henk
Signed-off-by: Miklos Szeredi
01 Jul, 2009
4 commits
-
Add notification messages that allow the filesystem to invalidate VFS
caches.Two notifications are added:
1) inode invalidation
- invalidate cached attributes
- invalidate a range of pages in the page cache (this is optional)2) dentry invalidation
- try to invalidate a subtree in the dentry cache
Care must be taken while accessing the 'struct super_block' for the
mount, as it can go away while an invalidation is in progress. To
prevent this, introduce a rw-semaphore, that is taken for read during
the invalidation and taken for write in the ->kill_sb callback.Cc: Csaba Henk
Cc: Anand Avati
Signed-off-by: Miklos Szeredi -
This patch lets filesystems handle masking the file mode on creation.
This is needed if filesystem is using ACLs.- The CREATE, MKDIR and MKNOD requests are extended with a "umask"
parameter.- A new FUSE_DONT_MASK flag is added to the INIT request/reply. With
this the filesystem may request that the create mode is not masked.CC: Jean-Pierre André
Signed-off-by: Miklos Szeredi -
Fix fuse_file_poll() which returned a -errno value instead of a poll
mask.Signed-off-by: Miklos Szeredi
CC: stable@kernel.org -
On 64 bit systems -- where sizeof(ssize_t) > sizeof(int) -- the following test
exposes a bug due to a non-careful return of an int or unsigned value:implement a FUSE filesystem which sends an unsolicited notification to
the kernel with invalid opcode. The respective write to /dev/fuse
will return (1 << 32) - EINVAL with errno == 0 instead of -1 with
errno == EINVAL.Signed-off-by: Miklos Szeredi
CC: stable@kernel.org
17 Jun, 2009
1 commit
-
Signed-off-by: Al Viro
13 Jun, 2009
1 commit
-
* 'cuse' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
CUSE: implement CUSE - Character device in Userspace
fuse: export symbols to be used by CUSE
fuse: update fuse_conn_init() and separate out fuse_conn_kill()
fuse: don't use inode in fuse_file_poll
fuse: don't use inode in fuse_do_ioctl() helper
fuse: don't use inode in fuse_sync_release()
fuse: create fuse_do_open() helper for CUSE
fuse: clean up args in fuse_finish_open() and fuse_release_fill()
fuse: don't use inode in helpers called by fuse_direct_io()
fuse: add members to struct fuse_file
fuse: prepare fuse_direct_io() for CUSE
fuse: clean up fuse_write_fill()
fuse: use struct path in release structure
fuse: misc cleanups
09 Jun, 2009
1 commit
-
CUSE enables implementing character devices in userspace. With recent
additions of ioctl and poll support, FUSE already has most of what's
necessary to implement character devices. All CUSE has to do is
bonding all those components - FUSE, chardev and the driver model -
nicely.When client opens /dev/cuse, kernel starts conversation with
CUSE_INIT. The client tells CUSE which device it wants to create. As
the previous patch made fuse_file usable without associated
fuse_inode, CUSE doesn't create super block or inodes. It attaches
fuse_file to cdev file->private_data during open and set ff->fi to
NULL. The rest of the operation is almost identical to FUSE direct IO
case.Each CUSE device has a corresponding directory /sys/class/cuse/DEVNAME
(which is symlink to /sys/devices/virtual/class/DEVNAME if
SYSFS_DEPRECATED is turned off) which hosts "waiting" and "abort"
among other things. Those two files have the same meaning as the FUSE
control files.The only notable lacking feature compared to in-kernel implementation
is mmap support.Signed-off-by: Tejun Heo
Signed-off-by: Miklos Szeredi
14 May, 2009
1 commit
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
fuse: destroy bdi on error
09 May, 2009
1 commit
-
Push BKL down into ->umount_begin()
Signed-off-by: Alessio Igor Bogani
Signed-off-by: Al Viro
28 Apr, 2009
14 commits
-
Export the following symbols for CUSE.
fuse_conn_put()
fuse_conn_get()
fuse_conn_kill()
fuse_send_init()
fuse_do_open()
fuse_sync_release()
fuse_direct_io()
fuse_do_ioctl()
fuse_file_poll()
fuse_request_alloc()
fuse_get_req()
fuse_put_request()
fuse_request_send()
fuse_abort_conn()
fuse_dev_release()
fuse_dev_operationsSigned-off-by: Tejun Heo
Signed-off-by: Miklos Szeredi -
Update fuse_conn_init() such that it doesn't take @sb and move bdi
registration into a separate function. Also separate out
fuse_conn_kill() from fuse_put_super().These will be used to implement cuse.
Signed-off-by: Tejun Heo
Signed-off-by: Miklos Szeredi -
Use ff->fc and ff->nodeid instead of file->f_dentry->d_inode in the
fuse_file_poll() implementation.This prepares this function for use by CUSE, where the inode is not
owned by a fuse filesystem.Signed-off-by: Miklos Szeredi
-
Create a helper for sending an IOCTL request that doesn't use a struct
inode.This prepares this function for use by CUSE, where the inode is not
owned by a fuse filesystem.Signed-off-by: Miklos Szeredi
-
Make fuse_sync_release() a generic helper function that doesn't need a
struct inode pointer. This makes it suitable for use by CUSE.Change return value of fuse_release_common() from int to void.
Signed-off-by: Miklos Szeredi
-
Create a helper for sending an OPEN request that doesn't need a struct
inode pointer.Signed-off-by: Miklos Szeredi
-
Move setting ff->fh, ff->nodeid and file->private_data outside
fuse_finish_open(). Add ->open_flags member to struct fuse_file.This simplifies the argument passing to fuse_finish_open() and
fuse_release_fill(), and paves the way for creating an open helper
that doesn't need an inode pointer.Signed-off-by: Miklos Szeredi
-
Use ff->fc and ff->nodeid instead of passing down the inode.
This prepares this function for use by CUSE, where the inode is not
owned by a fuse filesystem.Signed-off-by: Miklos Szeredi
-
Add new members ->fc and ->nodeid to struct fuse_file. This will aid
in converting functions for use by CUSE, where the inode is not owned
by a fuse filesystem.Signed-off-by: Miklos Szeredi
-
Move code operating on the inode out from fuse_direct_io().
This prepares this function for use by CUSE, where the inode is not
owned by a fuse filesystem.Signed-off-by: Miklos Szeredi
-
Move out code from fuse_write_fill() which is not common to all
callers. Remove two function arguments which become unnecessary.Also remove unnecessary memset(), the request is already initialized
to zero.Signed-off-by: Miklos Szeredi
-
Use struct path instead of separate dentry and vfsmount in
req->misc.release.Signed-off-by: Miklos Szeredi
-
Destroy bdi on error in fuse_fill_super().
This was an omission from commit 26c3679101dbccc054dcf370143941844ba70531
"fuse: destroy bdi on umount", which moved the bdi_destroy() call from
fuse_conn_put() to fuse_put_super().Signed-off-by: Miklos Szeredi
CC: stable@kernel.org -
* fuse_file_alloc() was structured in weird way. The success path was
split between else block and code following the block. Restructure
the code such that it's easier to read and modify.* Unindent success path of fuse_release_common() to ease future
changes.Signed-off-by: Tejun Heo
Signed-off-by: Miklos Szeredi
09 Apr, 2009
2 commits
-
MAP_PRIVATE mmap could return stale data from the cache for
"direct_io" files. Fix this by flushing the cache on mmap.Found with a slightly modified fsx-linux.
Signed-off-by: Miklos Szeredi
-
Fix the following warning:
fs/fuse/file.c: In function 'fuse_direct_io':
fs/fuse/file.c:1002: warning: passing argument 3 of 'fuse_get_user_pages' from incompatible pointer typeThis was introduced by commit f4975c67 "fuse: allow kernel to access
"direct_io" files".Signed-off-by: Miklos Szeredi
02 Apr, 2009
2 commits
-
Allow MAP_PRIVATE mmaps of "direct_io" files. This is necessary for
execute support.MAP_SHARED mappings require some sort of coherency between the
underlying file and the mapping. With "direct_io" it is difficult to
provide this, so for the moment just disallow shared (read-write and
read-only) mappings altogether.Signed-off-by: Miklos Szeredi
-
Allow the kernel read and write on "direct_io" files. This is
necessary for nfs export and execute support.The implementation is simple: if an access from the kernel is
detected, don't perform get_user_pages(), just use the kernel address
provided by the requester to copy from/to the userspace filesystem.Signed-off-by: Miklos Szeredi
01 Apr, 2009
1 commit
-
Change the page_mkwrite prototype to take a struct vm_fault, and return
VM_FAULT_xxx flags. There should be no functional change.This makes it possible to return much more detailed error information to
the VM (and also can provide more information eg. virtual_address to the
driver, which might be important in some special cases).This is required for a subsequent fix. And will also make it easier to
merge page_mkwrite() with fault() in future.Signed-off-by: Nick Piggin
Cc: Chris Mason
Cc: Trond Myklebust
Cc: Miklos Szeredi
Cc: Steven Whitehouse
Cc: Mark Fasheh
Cc: Joel Becker
Cc: Artem Bityutskiy
Cc: Felix Blyakher
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds