Revision tags: v2.6.37-rc5, v2.6.37-rc4, v2.6.37-rc3, v2.6.37-rc2, v2.6.37-rc1 |
|
#
0be8557b |
| 27-Oct-2010 |
Miklos Szeredi <mszeredi@suse.cz> |
fuse: use release_pages()
Replace iterated page_cache_release() with release_pages(), which is faster and shorter.
Needs release_pages() to be exported to modules.
Suggested-by: Andrew Morton <akp
fuse: use release_pages()
Replace iterated page_cache_release() with release_pages(), which is faster and shorter.
Needs release_pages() to be exported to modules.
Suggested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
#
b6777c40 |
| 26-Oct-2010 |
Miklos Szeredi <mszeredi@suse.cz> |
fuse: use clear_highpage() and KM_USER0 instead of KM_USER1
Commit 7909b1c640 ("fuse: don't use atomic kmap") removed KM_USER0 usage from fuse/dev.c. Switch KM_USER1 uses to KM_USER0 for clarity.
fuse: use clear_highpage() and KM_USER0 instead of KM_USER1
Commit 7909b1c640 ("fuse: don't use atomic kmap") removed KM_USER0 usage from fuse/dev.c. Switch KM_USER1 uses to KM_USER0 for clarity. Also replace open coded clear_highpage().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
#
3ecb01df |
| 26-Oct-2010 |
Jan Beulich <JBeulich@novell.com> |
use clear_page()/copy_page() in favor of memset()/memcpy() on whole pages
After all that's what they are intended for.
Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: Miklos Szeredi <miklos@sz
use clear_page()/copy_page() in favor of memset()/memcpy() on whole pages
After all that's what they are intended for.
Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
Revision tags: v2.6.36, v2.6.36-rc8, v2.6.36-rc7 |
|
#
0157443c |
| 30-Sep-2010 |
Geert Uytterhoeven <geert@linux-m68k.org> |
fuse: Initialize total_len in fuse_retrieve()
fs/fuse/dev.c:1357: warning: ‘total_len’ may be used uninitialized in this function
Initialize total_len to zero, else its value will be undefined.
Si
fuse: Initialize total_len in fuse_retrieve()
fs/fuse/dev.c:1357: warning: ‘total_len’ may be used uninitialized in this function
Initialize total_len to zero, else its value will be undefined.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
show more ...
|
Revision tags: v2.6.36-rc6, v2.6.36-rc5, v2.6.36-rc4 |
|
#
b9ca67b2 |
| 07-Sep-2010 |
Miklos Szeredi <mszeredi@suse.cz> |
fuse: fix lock annotations
Sparse doesn't understand lock annotations of the form __releases(&foo->lock). Change them to __releases(foo->lock). Same for __acquires().
Signed-off-by: Miklos Szered
fuse: fix lock annotations
Sparse doesn't understand lock annotations of the form __releases(&foo->lock). Change them to __releases(foo->lock). Same for __acquires().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
show more ...
|
#
595afaf9 |
| 07-Sep-2010 |
Miklos Szeredi <mszeredi@suse.cz> |
fuse: flush background queue on connection close
David Bartly reported that fuse can hang in fuse_get_req_nofail() when the connection to the filesystem server is no longer active.
If bg_queue is n
fuse: flush background queue on connection close
David Bartly reported that fuse can hang in fuse_get_req_nofail() when the connection to the filesystem server is no longer active.
If bg_queue is not empty then flush_bg_queue() called from request_end() can put more requests on to the pending queue. If this happens while ending requests on the processing queue then those background requests will be queued to the pending list and never ended.
Another problem is that fuse_dev_release() didn't wake up processes sleeping on blocked_waitq.
Solve this by:
a) flushing the background queue before calling end_requests() on the pending and processing queues
b) setting blocked = 0 and waking up processes waiting on blocked_waitq()
Thanks to David for an excellent bug report.
Reported-by: David Bartley <andareed@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> CC: stable@kernel.org
show more ...
|
Revision tags: v2.6.36-rc3, v2.6.36-rc2, v2.6.36-rc1, v2.6.35, v2.6.35-rc6, v2.6.35-rc5 |
|
#
2d45ba38 |
| 12-Jul-2010 |
Miklos Szeredi <mszeredi@suse.cz> |
fuse: add retrieve request
Userspace filesystem can request data to be retrieved from the inode's mapping. This request is synchronous and the retrieved data is queued as a new request. If the wri
fuse: add retrieve request
Userspace filesystem can request data to be retrieved from the inode's mapping. This request is synchronous and the retrieved data is queued as a new request. If the write to the fuse device returns an error then the retrieve request was not completed and a reply will not be sent.
Only present pages are returned in the retrieve reply. Retrieving stops when it finds a non-present page and only data prior to that is returned.
This request doesn't change the dirty state of pages.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
show more ...
|
#
a1d75f25 |
| 12-Jul-2010 |
Miklos Szeredi <mszeredi@suse.cz> |
fuse: add store request
Userspace filesystem can request data to be stored in the inode's mapping. This request is synchronous and has no reply. If the write to the fuse device returns an error th
fuse: add store request
Userspace filesystem can request data to be stored in the inode's mapping. This request is synchronous and has no reply. If the write to the fuse device returns an error then the store request was not fully completed (but may have updated some pages).
If the stored data overflows the current file size, then the size is extended, similarly to a write(2) on the filesystem.
Pages which have been completely stored are marked uptodate.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
show more ...
|
#
7909b1c6 |
| 12-Jul-2010 |
Miklos Szeredi <mszeredi@suse.cz> |
fuse: don't use atomic kmap
Don't use atomic kmap for mapping userspace buffers in device read/write/splice.
This is necessary because the next patch (adding store notify) requires that caller of f
fuse: don't use atomic kmap
Don't use atomic kmap for mapping userspace buffers in device read/write/splice.
This is necessary because the next patch (adding store notify) requires that caller of fuse_copy_page() may sleep between invocations. The simplest way to ensure this is to change the atomic kmaps to non-atomic ones.
Thankfully architectures where kmap() is not a no-op are going out of fashion, so we can ignore the (probably negligible) performance impact of this change.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
show more ...
|
Revision tags: v2.6.35-rc4, v2.6.35-rc3, v2.6.35-rc2, v2.6.35-rc1 |
|
#
578454ff |
| 20-May-2010 |
Kay Sievers <kay.sievers@vrfy.org> |
driver core: add devname module aliases to allow module on-demand auto-loading
This adds: alias: devname:<name> to some common kernel modules, which will allow the on-demand loading of the kernel
driver core: add devname module aliases to allow module on-demand auto-loading
This adds: alias: devname:<name> to some common kernel modules, which will allow the on-demand loading of the kernel module when the device node is accessed.
Ideally all these modules would be compiled-in, but distros seems too much in love with their modularization that we need to cover the common cases with this new facility. It will allow us to remove a bunch of pretty useless init scripts and modprobes from init scripts.
The static device node aliases will be carried in the module itself. The program depmod will extract this information to a file in the module directory: $ cat /lib/modules/2.6.34-00650-g537b60d-dirty/modules.devname # Device nodes to trigger on-demand module loading. microcode cpu/microcode c10:184 fuse fuse c10:229 ppp_generic ppp c108:0 tun net/tun c10:200 dm_mod mapper/control c10:235
Udev will pick up the depmod created file on startup and create all the static device nodes which the kernel modules specify, so that these modules get automatically loaded when the device node is accessed: $ /sbin/udevd --debug ... static_dev_create_from_modules: mknod '/dev/cpu/microcode' c10:184 static_dev_create_from_modules: mknod '/dev/fuse' c10:229 static_dev_create_from_modules: mknod '/dev/ppp' c108:0 static_dev_create_from_modules: mknod '/dev/net/tun' c10:200 static_dev_create_from_modules: mknod '/dev/mapper/control' c10:235 udev_rules_apply_static_dev_perms: chmod '/dev/net/tun' 0666 udev_rules_apply_static_dev_perms: chmod '/dev/fuse' 0666
A few device nodes are switched to statically allocated numbers, to allow the static nodes to work. This might also useful for systems which still run a plain static /dev, which is completely unsafe to use with any dynamic minor numbers.
Note: The devname aliases must be limited to the *common* and *single*instance* device nodes, like the misc devices, and never be used for conceptually limited systems like the loop devices, which should rather get fixed properly and get a control node for losetup to talk to, instead of creating a random number of device nodes in advance, regardless if they are ever used.
This facility is to hide the mess distros are creating with too modualized kernels, and just to hide that these modules are not compiled-in, and not to paper-over broken concepts. Thanks! :)
Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: David S. Miller <davem@davemloft.net> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Chris Mason <chris.mason@oracle.com> Cc: Alasdair G Kergon <agk@redhat.com> Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk> Cc: Ian Kent <raven@themaw.net> Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
#
c3021629 |
| 25-May-2010 |
Miklos Szeredi <mszeredi@suse.cz> |
fuse: support splice() reading from fuse device
Allow userspace filesystem implementation to use splice() to read from the fuse device.
The userspace filesystem can now transfer data coming from a
fuse: support splice() reading from fuse device
Allow userspace filesystem implementation to use splice() to read from the fuse device.
The userspace filesystem can now transfer data coming from a WRITE request to an arbitrary file descriptor (regular file, block device or socket) without having to go through a userspace buffer.
The semantics of using splice() to read messages are:
1) with a single splice() call move the whole message from the fuse device to a temporary pipe 2) read the header from the pipe and determine the message type 3a) if message is a WRITE then splice data from pipe to destination 3b) else read rest of message to userspace buffer
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
show more ...
|
#
ce534fb0 |
| 25-May-2010 |
Miklos Szeredi <mszeredi@suse.cz> |
fuse: allow splice to move pages
When splicing buffers to the fuse device with SPLICE_F_MOVE, try to move pages from the pipe buffer into the page cache. This allows populating the fuse filesystem'
fuse: allow splice to move pages
When splicing buffers to the fuse device with SPLICE_F_MOVE, try to move pages from the pipe buffer into the page cache. This allows populating the fuse filesystem's cache without ever touching the page contents, i.e. zero copy read capability.
The following steps are performed when trying to move a page into the page cache:
- buf->ops->confirm() to make sure the new page is uptodate - buf->ops->steal() to try to remove the new page from it's previous place - remove_from_page_cache() on the old page - add_to_page_cache_locked() on the new page
If any of the above steps fail (non fatally) then the code falls back to copying the page. In particular ->steal() will fail if there are external references (other than the page cache and the pipe buffer) to the page.
Also since the remove_from_page_cache() + add_to_page_cache_locked() are non-atomic it is possible that the page cache is repopulated in between the two and add_to_page_cache_locked() will fail. This could be fixed by creating a new atomic replace_page_cache_page() function.
fuse_readpages_end() needed to be reworked so it works even if page->mapping is NULL for some or all pages which can happen if the add_to_page_cache_locked() failed.
A number of sanity checks were added to make sure the stolen pages don't have weird flags set, etc... These could be moved into generic splice/steal code.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
show more ...
|
#
dd3bb14f |
| 25-May-2010 |
Miklos Szeredi <mszeredi@suse.cz> |
fuse: support splice() writing to fuse device
Allow userspace filesystem implementation to use splice() to write to the fuse device. The semantics of using splice() are:
1) buffer the message hea
fuse: support splice() writing to fuse device
Allow userspace filesystem implementation to use splice() to write to the fuse device. The semantics of using splice() are:
1) buffer the message header and data in a temporary pipe 2) with a *single* splice() call move the message from the temporary pipe to the fuse device
The READ reply message has the most interesting use for this, since now the data from an arbitrary file descriptor (which could be a regular file, a block device or a socket) can be tranferred into the fuse device without having to go through a userspace buffer. It will also allow zero copy moving of pages.
One caveat is that the protocol on the fuse device requires the length of the whole message to be written into the header. But the length of the data transferred into the temporary pipe may not be known in advance. The current library implementation works around this by using vmplice to write the header and modifying the header after splicing the data into the pipe (error handling omitted):
struct fuse_out_header out;
iov.iov_base = &out; iov.iov_len = sizeof(struct fuse_out_header); vmsplice(pip[1], &iov, 1, 0); len = splice(input_fd, input_offset, pip[1], NULL, len, 0); /* retrospectively modify the header: */ out.len = len + sizeof(struct fuse_out_header); splice(pip[0], NULL, fuse_chan_fd(req->ch), NULL, out.len, flags);
This works since vmsplice only saves a pointer to the data, it does not copy the data itself.
Since pipes are currently limited to 16 pages and messages need to be spliced atomically, the length of the data is limited to 15 pages (or 60kB for 4k pages).
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
show more ...
|
#
1bf94ca7 |
| 25-May-2010 |
Miklos Szeredi <mszeredi@suse.cz> |
fuse: use get_user_pages_fast()
Replace uses of get_user_pages() with get_user_pages_fast(). It looks nicer and should be faster in most cases.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
|
Revision tags: v2.6.34, v2.6.34-rc7, v2.6.34-rc6, v2.6.34-rc5, v2.6.34-rc4, v2.6.34-rc3, v2.6.34-rc2, v2.6.34-rc1, v2.6.33, v2.6.33-rc8, v2.6.33-rc7, v2.6.33-rc6, v2.6.33-rc5, v2.6.33-rc4, v2.6.33-rc3 |
|
#
b2d82ee3 |
| 30-Dec-2009 |
Fang Wenqi <anton.fang@gmail.com> |
fuse: fix large stack use
gcc 4.4 warns about: fs/fuse/dev.c: In function ‘fuse_notify_inval_entry’: fs/fuse/dev.c:925: warning: the frame size of 1060 bytes is larger than 1024 bytes
The probl
fuse: fix large stack use
gcc 4.4 warns about: fs/fuse/dev.c: In function ‘fuse_notify_inval_entry’: fs/fuse/dev.c:925: warning: the frame size of 1060 bytes is larger than 1024 bytes
The problem is we declare two structures and a large array on the stack, I move the array alway from the stack and allocate memory for it dynamically.
Signed-off-by: Fang Wenqi <antonf@turbolinux.com.cn> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
show more ...
|
#
b21dda43 |
| 05-Feb-2010 |
Miklos Szeredi <mszeredi@suse.cz> |
fuse: cleanup in fuse_notify_inval_...()
Small cleanup in fuse_notify_inval_inode() and fuse_notify_inval_entry().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
|
Revision tags: v2.6.33-rc2, v2.6.33-rc1, v2.6.32, v2.6.32-rc8, v2.6.32-rc7, v2.6.32-rc6, v2.6.32-rc5, v2.6.32-rc4, v2.6.32-rc3, v2.6.32-rc1, v2.6.32-rc2, v2.6.31, v2.6.31-rc9, v2.6.31-rc8, v2.6.31-rc7, v2.6.31-rc6, v2.6.31-rc5, v2.6.31-rc4, v2.6.31-rc3 |
|
#
81e4e1ba |
| 11-Jul-2009 |
Linus Torvalds <torvalds@linux-foundation.org> |
Revert "fuse: Fix build error" as unnecessary
This reverts commit 097041e576ee3a50d92dd643ee8ca65bf6a62e21.
Trond had a better fix, which is the parent of this one ("Fix compile error due to conges
Revert "fuse: Fix build error" as unnecessary
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 <Trond.Myklebust@netapp.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
#
097041e5 |
| 10-Jul-2009 |
Larry Finger <Larry.Finger@lwfinger.net> |
fuse: Fix build error
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/
fuse: Fix build error
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 <torvalds@linux-foundation.org>
show more ...
|
#
8aa7e847 |
| 09-Jul-2009 |
Jens Axboe <jens.axboe@oracle.com> |
Fix congestion_wait() sync/async vs read/write confusion
Commit 1faa16d22877f4839bd433547d770c676d1d964c accidentally broke the bdi congestion wait queue logic, causing us to wait on congestion for
Fix congestion_wait() sync/async vs read/write confusion
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 <jens.axboe@oracle.com>
show more ...
|
Revision tags: v2.6.31-rc2 |
|
#
7a6d3c8b |
| 01-Jul-2009 |
Csaba Henk <csaba@gluster.com> |
fuse: make the number of max background requests and congestion threshold tunable
The practical values for these limits depend on the design of the filesystem server so let userspace set them at ini
fuse: make the number of max background requests and congestion threshold tunable
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 <csaba@gluster.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
show more ...
|
Revision tags: v2.6.31-rc1, v2.6.30, v2.6.30-rc8 |
|
#
3b463ae0 |
| 31-May-2009 |
John Muir <muirj@nortel.com> |
fuse: invalidation reverse calls
Add notification messages that allow the filesystem to invalidate VFS caches.
Two notifications are added:
1) inode invalidation
- invalidate cached attribute
fuse: invalidation reverse calls
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 <csaba@gluster.com> Cc: Anand Avati <avati@zresearch.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
show more ...
|
#
b4c458b3 |
| 28-Jun-2009 |
Csaba Henk <csaba@gluster.com> |
fuse: fix return value of fuse_dev_write()
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:
impl
fuse: fix return value of fuse_dev_write()
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 <mszeredi@suse.cz> CC: stable@kernel.org
show more ...
|
Revision tags: v2.6.30-rc7, v2.6.30-rc6, v2.6.30-rc5, v2.6.30-rc4, v2.6.30-rc3, v2.6.30-rc2 |
|
#
08cbf542 |
| 13-Apr-2009 |
Tejun Heo <tj@kernel.org> |
fuse: export symbols to be used by CUSE
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: export symbols to be used by CUSE
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_operations
Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
show more ...
|
#
a325f9b9 |
| 13-Apr-2009 |
Tejun Heo <tj@kernel.org> |
fuse: update fuse_conn_init() and separate out fuse_conn_kill()
Update fuse_conn_init() such that it doesn't take @sb and move bdi registration into a separate function. Also separate out fuse_conn
fuse: update fuse_conn_init() and separate out fuse_conn_kill()
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 <tj@kernel.org> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
show more ...
|
Revision tags: v2.6.30-rc1, v2.6.29, v2.6.29-rc8, v2.6.29-rc7, v2.6.29-rc6, v2.6.29-rc5, v2.6.29-rc4, v2.6.29-rc3 |
|
#
f6d47a17 |
| 26-Jan-2009 |
Miklos Szeredi <mszeredi@suse.cz> |
fuse: fix poll notify
Move fuse_copy_finish() to before calling fuse_notify_poll_wakeup(). This is not a big issue because fuse_notify_poll_wakeup() should be atomic, but it's cleaner this way, and
fuse: fix poll notify
Move fuse_copy_finish() to before calling fuse_notify_poll_wakeup(). This is not a big issue because fuse_notify_poll_wakeup() should be atomic, but it's cleaner this way, and later uses of notification will need to be able to finish the copying before performing some actions.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
show more ...
|