mirror of
https://github.com/libfuse/libfuse.git
synced 2024-11-23 12:14:15 +08:00
merge to fuse_2_6_merge2
This commit is contained in:
parent
6e7d018049
commit
47910d7b8a
18
ChangeLog
18
ChangeLog
@ -1,3 +1,21 @@
|
||||
2007-02-02 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* kernel: make it compile on "strange" kernels which have emulated
|
||||
mutexes via <linux/mutex.h> but no i_mutex. Reported by Tomasz
|
||||
Mateja
|
||||
|
||||
2007-01-28 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* kernel: fix BUG in control filesystem if it is umounted and
|
||||
mounted again, while some fuse filesystems are present.
|
||||
Bugreport from Florent Mertens
|
||||
|
||||
* kernel: sync with mainline, support 2.6.20
|
||||
|
||||
2007-01-22 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* lib/Makefile.am: actually link libfuse against libfuse_libs
|
||||
|
||||
2007-01-19 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Build fix for 2.6.16 vanila and 2.6.15 FC5 kernels. Patch from
|
||||
|
@ -94,8 +94,8 @@ Mount options
|
||||
filesystem is free to implement it's access policy or leave it to
|
||||
the underlying file access mechanism (e.g. in case of network
|
||||
filesystems). This option enables permission checking, restricting
|
||||
access based on file mode. This is option is usually useful
|
||||
together with the 'allow_other' mount option.
|
||||
access based on file mode. It is usually useful together with the
|
||||
'allow_other' mount option.
|
||||
|
||||
'allow_other'
|
||||
|
||||
@ -132,7 +132,7 @@ For each connection the following files exist within this directory:
|
||||
|
||||
'waiting'
|
||||
|
||||
The number of requests which are waiting to be transfered to
|
||||
The number of requests which are waiting to be transferred to
|
||||
userspace or being processed by the filesystem daemon. If there is
|
||||
no filesystem activity and 'waiting' is non-zero, then the
|
||||
filesystem is hung or deadlocked.
|
||||
@ -157,7 +157,7 @@ following will happen:
|
||||
|
||||
2) If the request is not yet sent to userspace AND the signal is not
|
||||
fatal, then an 'interrupted' flag is set for the request. When
|
||||
the request has been successfully transfered to userspace and
|
||||
the request has been successfully transferred to userspace and
|
||||
this flag is set, an INTERRUPT request is queued.
|
||||
|
||||
3) If the request is already sent to userspace, then an INTERRUPT
|
||||
|
@ -172,7 +172,6 @@ struct fuse_operations {
|
||||
int (*write) (const char *, const char *, size_t, off_t,
|
||||
struct fuse_file_info *);
|
||||
|
||||
/** Just a placeholder, don't set */
|
||||
/** Get file system statistics
|
||||
*
|
||||
* The 'f_frsize', 'f_favail', 'f_fsid' and 'f_flag' fields are ignored
|
||||
|
@ -179,6 +179,20 @@ if test "$ENABLE_FUSE_MODULE" = y; then
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AC_MSG_CHECKING([if inode has i_mutex field ])
|
||||
if egrep -qw "i_mutex" $kernelsrc/include/linux/fs.h; then
|
||||
AC_DEFINE(HAVE_I_MUTEX, 1, [inode has i_mutex field])
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AC_MSG_CHECKING([if kernel has mutex.h ])
|
||||
if test -f $kernelsrc/include/linux/mutex.h; then
|
||||
AC_DEFINE(HAVE_MUTEX_H, 1, [kernel has mutex.h])
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
isuml=no
|
||||
KERNELMAKE_PARAMS=
|
||||
|
@ -221,8 +221,12 @@ static struct super_block *fuse_ctl_get_sb(struct file_system_type *fs_type,
|
||||
|
||||
static void fuse_ctl_kill_sb(struct super_block *sb)
|
||||
{
|
||||
struct fuse_conn *fc;
|
||||
|
||||
mutex_lock(&fuse_mutex);
|
||||
fuse_control_sb = NULL;
|
||||
list_for_each_entry(fc, &fuse_conn_list, entry)
|
||||
fc->ctl_ndents = 0;
|
||||
mutex_unlock(&fuse_mutex);
|
||||
|
||||
kill_litter_super(sb);
|
||||
|
@ -43,7 +43,7 @@ static void fuse_request_init(struct fuse_req *req)
|
||||
|
||||
struct fuse_req *fuse_request_alloc(void)
|
||||
{
|
||||
struct fuse_req *req = kmem_cache_alloc(fuse_req_cachep, SLAB_KERNEL);
|
||||
struct fuse_req *req = kmem_cache_alloc(fuse_req_cachep, GFP_KERNEL);
|
||||
if (req)
|
||||
fuse_request_init(req);
|
||||
return req;
|
||||
|
@ -500,10 +500,8 @@ static int fuse_commit_write(struct file *file, struct page *page,
|
||||
i_size_write(inode, pos);
|
||||
spin_unlock(&fc->lock);
|
||||
|
||||
if (offset == 0 && to == PAGE_CACHE_SIZE) {
|
||||
clear_page_dirty(page);
|
||||
if (offset == 0 && to == PAGE_CACHE_SIZE)
|
||||
SetPageUptodate(page);
|
||||
}
|
||||
}
|
||||
fuse_invalidate_attr(inode);
|
||||
return err;
|
||||
|
@ -42,7 +42,7 @@
|
||||
# define KERNEL_2_6_19_PLUS
|
||||
#endif
|
||||
|
||||
#ifdef __arm__
|
||||
#if defined(__arm__) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
|
||||
#define DCACHE_BUG
|
||||
#endif
|
||||
|
||||
@ -55,13 +55,18 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/backing-dev.h>
|
||||
#ifndef DEFINE_MUTEX
|
||||
#ifdef HAVE_MUTEX_H
|
||||
#include <linux/mutex.h>
|
||||
#else
|
||||
#include <asm/semaphore.h>
|
||||
#define DEFINE_MUTEX(m) DECLARE_MUTEX(m)
|
||||
#define mutex_init(m) init_MUTEX(m)
|
||||
#define mutex_destroy(m) do { } while (0)
|
||||
#define mutex_lock(m) down(m)
|
||||
#define mutex_unlock(m) up(m)
|
||||
#define mutex semaphore
|
||||
#endif
|
||||
#ifndef HAVE_I_MUTEX
|
||||
#define i_mutex i_sem /* Hack for struct inode */
|
||||
#endif
|
||||
#ifndef KERNEL_2_6_19_PLUS
|
||||
|
@ -52,7 +52,7 @@ static struct inode *fuse_alloc_inode(struct super_block *sb)
|
||||
struct inode *inode;
|
||||
struct fuse_inode *fi;
|
||||
|
||||
inode = kmem_cache_alloc(fuse_inode_cachep, SLAB_KERNEL);
|
||||
inode = kmem_cache_alloc(fuse_inode_cachep, GFP_KERNEL);
|
||||
if (!inode)
|
||||
return NULL;
|
||||
|
||||
@ -637,8 +637,10 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
|
||||
return -EINVAL;
|
||||
|
||||
if (is_bdev) {
|
||||
#ifdef CONFIG_BLOCK
|
||||
if (!sb_set_blocksize(sb, d.blksize))
|
||||
return -EINVAL;
|
||||
#endif
|
||||
} else {
|
||||
sb->s_blocksize = PAGE_CACHE_SIZE;
|
||||
sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
|
||||
@ -734,14 +736,6 @@ static int fuse_get_sb(struct file_system_type *fs_type,
|
||||
{
|
||||
return get_sb_nodev(fs_type, flags, raw_data, fuse_fill_super, mnt);
|
||||
}
|
||||
|
||||
static int fuse_get_sb_blk(struct file_system_type *fs_type,
|
||||
int flags, const char *dev_name,
|
||||
void *raw_data, struct vfsmount *mnt)
|
||||
{
|
||||
return get_sb_bdev(fs_type, flags, dev_name, raw_data, fuse_fill_super,
|
||||
mnt);
|
||||
}
|
||||
#else
|
||||
static struct super_block *fuse_get_sb(struct file_system_type *fs_type,
|
||||
int flags, const char *dev_name,
|
||||
@ -749,14 +743,6 @@ static struct super_block *fuse_get_sb(struct file_system_type *fs_type,
|
||||
{
|
||||
return get_sb_nodev(fs_type, flags, raw_data, fuse_fill_super);
|
||||
}
|
||||
|
||||
static struct super_block *fuse_get_sb_blk(struct file_system_type *fs_type,
|
||||
int flags, const char *dev_name,
|
||||
void *raw_data)
|
||||
{
|
||||
return get_sb_bdev(fs_type, flags, dev_name, raw_data,
|
||||
fuse_fill_super);
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct file_system_type fuse_fs_type = {
|
||||
@ -766,6 +752,25 @@ static struct file_system_type fuse_fs_type = {
|
||||
.kill_sb = kill_anon_super,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_BLOCK
|
||||
#ifdef KERNEL_2_6_18_PLUS
|
||||
static int fuse_get_sb_blk(struct file_system_type *fs_type,
|
||||
int flags, const char *dev_name,
|
||||
void *raw_data, struct vfsmount *mnt)
|
||||
{
|
||||
return get_sb_bdev(fs_type, flags, dev_name, raw_data, fuse_fill_super,
|
||||
mnt);
|
||||
}
|
||||
#else
|
||||
static struct super_block *fuse_get_sb_blk(struct file_system_type *fs_type,
|
||||
int flags, const char *dev_name,
|
||||
void *raw_data)
|
||||
{
|
||||
return get_sb_bdev(fs_type, flags, dev_name, raw_data,
|
||||
fuse_fill_super);
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct file_system_type fuseblk_fs_type = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "fuseblk",
|
||||
@ -774,6 +779,26 @@ static struct file_system_type fuseblk_fs_type = {
|
||||
.fs_flags = FS_REQUIRES_DEV,
|
||||
};
|
||||
|
||||
static inline int register_fuseblk(void)
|
||||
{
|
||||
return register_filesystem(&fuseblk_fs_type);
|
||||
}
|
||||
|
||||
static inline void unregister_fuseblk(void)
|
||||
{
|
||||
unregister_filesystem(&fuseblk_fs_type);
|
||||
}
|
||||
#else
|
||||
static inline int register_fuseblk(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void unregister_fuseblk(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FS_SUBSYS
|
||||
static decl_subsys(fs, NULL, NULL);
|
||||
#endif
|
||||
@ -798,7 +823,7 @@ static int __init fuse_fs_init(void)
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
err = register_filesystem(&fuseblk_fs_type);
|
||||
err = register_fuseblk();
|
||||
if (err)
|
||||
goto out_unreg;
|
||||
|
||||
@ -813,7 +838,7 @@ static int __init fuse_fs_init(void)
|
||||
return 0;
|
||||
|
||||
out_unreg2:
|
||||
unregister_filesystem(&fuseblk_fs_type);
|
||||
unregister_fuseblk();
|
||||
out_unreg:
|
||||
unregister_filesystem(&fuse_fs_type);
|
||||
out:
|
||||
@ -823,7 +848,7 @@ static int __init fuse_fs_init(void)
|
||||
static void fuse_fs_cleanup(void)
|
||||
{
|
||||
unregister_filesystem(&fuse_fs_type);
|
||||
unregister_filesystem(&fuseblk_fs_type);
|
||||
unregister_fuseblk();
|
||||
kmem_cache_destroy(fuse_inode_cachep);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user