Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168814
b: refs/heads/master
c: 3d7a641
h: refs/heads/master
v: v3
  • Loading branch information
David Howells committed Nov 19, 2009
1 parent 92e2440 commit 9c864e1
Show file tree
Hide file tree
Showing 26 changed files with 200 additions and 129 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e3a41d7b99e7f97d9a50bec2a8f4eb237ce1d504
refs/heads/master: 3d7a641e544e428191667e8b1f83f96fa46dbd65
1 change: 0 additions & 1 deletion trunk/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
*.elf
*.bin
*.gz
*.bz2
*.lzma
*.patch
*.gcno
Expand Down
6 changes: 3 additions & 3 deletions trunk/Documentation/filesystems/ocfs2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@ Lots of code taken from ext3 and other projects.
Authors in alphabetical order:
Joel Becker <joel.becker@oracle.com>
Zach Brown <zach.brown@oracle.com>
Mark Fasheh <mfasheh@suse.com>
Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel <kurt.hackel@oracle.com>
Tao Ma <tao.ma@oracle.com>
Sunil Mushran <sunil.mushran@oracle.com>
Manish Singh <manish.singh@oracle.com>
Tiger Yang <tiger.yang@oracle.com>

Caveats
=======
Features which OCFS2 does not support yet:
- quotas
- Directory change notification (F_NOTIFY)
- Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease)

Expand Down Expand Up @@ -71,6 +70,7 @@ commit=nrsec (*) Ocfs2 can be told to sync all its data and metadata
performance.
localalloc=8(*) Allows custom localalloc size in MB. If the value is too
large, the fs will silently revert it to the default.
Localalloc is not enabled for local mounts.
localflocks This disables cluster aware flock.
inode64 Indicates that Ocfs2 is allowed to create inodes at
any location in the filesystem, including those which
Expand Down
13 changes: 10 additions & 3 deletions trunk/Documentation/slow-work.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ USING SLOW WORK ITEMS
Firstly, a module or subsystem wanting to make use of slow work items must
register its interest:

int ret = slow_work_register_user();
int ret = slow_work_register_user(struct module *module);

This will return 0 if successful, or a -ve error upon failure.
This will return 0 if successful, or a -ve error upon failure. The module
pointer should be the module interested in using this facility (almost
certainly THIS_MODULE).


Slow work items may then be set up by:
Expand Down Expand Up @@ -110,7 +112,12 @@ operation. When all a module's slow work items have been processed, and the
module has no further interest in the facility, it should unregister its
interest:

slow_work_unregister_user();
slow_work_unregister_user(struct module *module);

The module pointer is used to wait for all outstanding work items for that
module before completing the unregistration. This prevents the put_ref() code
from being taken away before it completes. module should almost certainly be
THIS_MODULE.


===============
Expand Down
2 changes: 1 addition & 1 deletion trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 32
EXTRAVERSION = -rc8
EXTRAVERSION = -rc7
NAME = Man-Eating Seals of Antiquity

# *DOCUMENTATION*
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/parisc/kernel/unwind.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define dbg(x...)
#endif

#define KERNEL_START (KERNEL_BINARY_TEXT_START)
#define KERNEL_START (KERNEL_BINARY_TEXT_START - 0x1000)

extern struct unwind_table_entry __start___unwind[];
extern struct unwind_table_entry __stop___unwind[];
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/parisc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ SECTIONS
*/
. = ALIGN(PAGE_SIZE);
data_start = .;
EXCEPTION_TABLE(16)

NOTES

/* unwind info */
.PARISC.unwind : {
Expand All @@ -86,9 +89,6 @@ SECTIONS
__stop___unwind = .;
}

EXCEPTION_TABLE(16)
NOTES

/* Data */
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/char/vt_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ void vt_event_post(unsigned int event, unsigned int old, unsigned int new)
ve->event.event = event;
/* kernel view is consoles 0..n-1, user space view is
console 1..n with 0 meaning current, so we must bias */
ve->event.oldev = old + 1;
ve->event.newev = new + 1;
ve->event.old = old + 1;
ve->event.new = new + 1;
wake = 1;
ve->done = 1;
}
Expand Down Expand Up @@ -186,7 +186,7 @@ int vt_waitactive(int n)
vt_event_wait(&vw);
if (vw.done == 0)
return -EINTR;
} while (vw.event.newev != n);
} while (vw.event.new != n);
return 0;
}

Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/i2c/busses/i2c-pnx.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
#include <linux/completion.h>
#include <linux/platform_device.h>
#include <linux/i2c-pnx.h>
#include <linux/io.h>
#include <mach/hardware.h>
#include <mach/i2c.h>
#include <asm/irq.h>
#include <asm/uaccess.h>

Expand Down Expand Up @@ -56,9 +54,6 @@ static inline void i2c_pnx_arm_timer(struct i2c_adapter *adap)
struct timer_list *timer = &data->mif.timer;
int expires = I2C_PNX_TIMEOUT / (1000 / HZ);

if (expires <= 1)
expires = 2;

del_timer_sync(timer);

dev_dbg(&adap->dev, "Timer armed at %lu plus %u jiffies.\n",
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/pci/dmar.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,6 @@ int __init check_zero_address(void)
dmi_get_system_info(DMI_BIOS_VENDOR),
dmi_get_system_info(DMI_BIOS_VERSION),
dmi_get_system_info(DMI_PRODUCT_VERSION));
#ifdef CONFIG_DMAR
dmar_disabled = 1;
#endif
return 0;
}
break;
Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/fscache/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static int __init fscache_init(void)
{
int ret;

ret = slow_work_register_user();
ret = slow_work_register_user(THIS_MODULE);
if (ret < 0)
goto error_slow_work;

Expand Down Expand Up @@ -80,7 +80,7 @@ static int __init fscache_init(void)
error_cookie_jar:
fscache_proc_cleanup();
error_proc:
slow_work_unregister_user();
slow_work_unregister_user(THIS_MODULE);
error_slow_work:
return ret;
}
Expand All @@ -97,7 +97,7 @@ static void __exit fscache_exit(void)
kobject_put(fscache_root);
kmem_cache_destroy(fscache_cookie_jar);
fscache_proc_cleanup();
slow_work_unregister_user();
slow_work_unregister_user(THIS_MODULE);
printk(KERN_NOTICE "FS-Cache: Unloaded\n");
}

Expand Down
1 change: 1 addition & 0 deletions trunk/fs/fscache/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ static void fscache_enqueue_dependents(struct fscache_object *);
static void fscache_dequeue_object(struct fscache_object *);

const struct slow_work_ops fscache_object_slow_work_ops = {
.owner = THIS_MODULE,
.get_ref = fscache_object_slow_work_get_ref,
.put_ref = fscache_object_slow_work_put_ref,
.execute = fscache_object_slow_work_execute,
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/fscache/operation.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ static void fscache_op_execute(struct slow_work *work)
}

const struct slow_work_ops fscache_op_slow_work_ops = {
.owner = THIS_MODULE,
.get_ref = fscache_op_get_ref,
.put_ref = fscache_op_put_ref,
.execute = fscache_op_execute,
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/gfs2/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static int __init init_gfs2_fs(void)
if (error)
goto fail_unregister;

error = slow_work_register_user();
error = slow_work_register_user(THIS_MODULE);
if (error)
goto fail_slow;

Expand Down Expand Up @@ -163,7 +163,7 @@ static void __exit exit_gfs2_fs(void)
gfs2_unregister_debugfs();
unregister_filesystem(&gfs2_fs_type);
unregister_filesystem(&gfs2meta_fs_type);
slow_work_unregister_user();
slow_work_unregister_user(THIS_MODULE);

kmem_cache_destroy(gfs2_quotad_cachep);
kmem_cache_destroy(gfs2_rgrpd_cachep);
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/gfs2/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ static void gfs2_recover_work(struct slow_work *work)
}

struct slow_work_ops gfs2_recover_ops = {
.owner = THIS_MODULE,
.get_ref = gfs2_recover_get_ref,
.put_ref = gfs2_recover_put_ref,
.execute = gfs2_recover_work,
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2767,7 +2767,7 @@ static int _nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
.pages = &page,
.pgbase = 0,
.count = count,
.bitmask = NFS_SERVER(dentry->d_inode)->attr_bitmask,
.bitmask = NFS_SERVER(dentry->d_inode)->cache_consistency_bitmask,
};
struct nfs4_readdir_res res;
struct rpc_message msg = {
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1712,8 +1712,7 @@ int ocfs2_check_range_for_refcount(struct inode *inode, loff_t pos,
struct super_block *sb = inode->i_sb;

if (!ocfs2_refcount_tree(OCFS2_SB(inode->i_sb)) ||
!(OCFS2_I(inode)->ip_dyn_features & OCFS2_HAS_REFCOUNT_FL) ||
OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL)
!(OCFS2_I(inode)->ip_dyn_features & OCFS2_HAS_REFCOUNT_FL))
return 0;

cpos = pos >> OCFS2_SB(sb)->s_clustersize_bits;
Expand Down
7 changes: 6 additions & 1 deletion trunk/fs/ocfs2/ocfs2.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@
#include <linux/kref.h>
#include <linux/mutex.h>
#include <linux/lockdep.h>
#include <linux/jbd2.h>
#ifndef CONFIG_OCFS2_COMPAT_JBD
# include <linux/jbd2.h>
#else
# include <linux/jbd.h>
# include "ocfs2_jbd_compat.h"
#endif

/* For union ocfs2_dlm_lksb */
#include "stackglue.h"
Expand Down
69 changes: 5 additions & 64 deletions trunk/fs/ocfs2/refcounttree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3743,9 +3743,6 @@ static int ocfs2_attach_refcount_tree(struct inode *inode,
goto out;
}

if (oi->ip_dyn_features & OCFS2_INLINE_DATA_FL)
goto attach_xattr;

ocfs2_init_dinode_extent_tree(&di_et, INODE_CACHE(inode), di_bh);

size = i_size_read(inode);
Expand All @@ -3772,7 +3769,6 @@ static int ocfs2_attach_refcount_tree(struct inode *inode,
cpos += num_clusters;
}

attach_xattr:
if (oi->ip_dyn_features & OCFS2_HAS_XATTR_FL) {
ret = ocfs2_xattr_attach_refcount_tree(inode, di_bh,
&ref_tree->rf_ci,
Expand Down Expand Up @@ -3862,49 +3858,6 @@ static int ocfs2_add_refcounted_extent(struct inode *inode,
return ret;
}

static int ocfs2_duplicate_inline_data(struct inode *s_inode,
struct buffer_head *s_bh,
struct inode *t_inode,
struct buffer_head *t_bh)
{
int ret;
handle_t *handle;
struct ocfs2_super *osb = OCFS2_SB(s_inode->i_sb);
struct ocfs2_dinode *s_di = (struct ocfs2_dinode *)s_bh->b_data;
struct ocfs2_dinode *t_di = (struct ocfs2_dinode *)t_bh->b_data;

BUG_ON(!(OCFS2_I(s_inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL));

handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
if (IS_ERR(handle)) {
ret = PTR_ERR(handle);
mlog_errno(ret);
goto out;
}

ret = ocfs2_journal_access_di(handle, INODE_CACHE(t_inode), t_bh,
OCFS2_JOURNAL_ACCESS_WRITE);
if (ret) {
mlog_errno(ret);
goto out_commit;
}

t_di->id2.i_data.id_count = s_di->id2.i_data.id_count;
memcpy(t_di->id2.i_data.id_data, s_di->id2.i_data.id_data,
le16_to_cpu(s_di->id2.i_data.id_count));
spin_lock(&OCFS2_I(t_inode)->ip_lock);
OCFS2_I(t_inode)->ip_dyn_features |= OCFS2_INLINE_DATA_FL;
t_di->i_dyn_features = cpu_to_le16(OCFS2_I(t_inode)->ip_dyn_features);
spin_unlock(&OCFS2_I(t_inode)->ip_lock);

ocfs2_journal_dirty(handle, t_bh);

out_commit:
ocfs2_commit_trans(osb, handle);
out:
return ret;
}

static int ocfs2_duplicate_extent_list(struct inode *s_inode,
struct inode *t_inode,
struct buffer_head *t_bh,
Expand Down Expand Up @@ -4044,14 +3997,6 @@ static int ocfs2_create_reflink_node(struct inode *s_inode,
goto out;
}

if (OCFS2_I(s_inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) {
ret = ocfs2_duplicate_inline_data(s_inode, s_bh,
t_inode, t_bh);
if (ret)
mlog_errno(ret);
goto out;
}

ret = ocfs2_lock_refcount_tree(osb, le64_to_cpu(di->i_refcount_loc),
1, &ref_tree, &ref_root_bh);
if (ret) {
Expand All @@ -4068,6 +4013,10 @@ static int ocfs2_create_reflink_node(struct inode *s_inode,
goto out_unlock_refcount;
}

ret = ocfs2_complete_reflink(s_inode, s_bh, t_inode, t_bh, preserve);
if (ret)
mlog_errno(ret);

out_unlock_refcount:
ocfs2_unlock_refcount_tree(osb, ref_tree, 1);
brelse(ref_root_bh);
Expand Down Expand Up @@ -4119,17 +4068,9 @@ static int __ocfs2_reflink(struct dentry *old_dentry,
ret = ocfs2_reflink_xattrs(inode, old_bh,
new_inode, new_bh,
preserve);
if (ret) {
if (ret)
mlog_errno(ret);
goto inode_unlock;
}
}

ret = ocfs2_complete_reflink(inode, old_bh,
new_inode, new_bh, preserve);
if (ret)
mlog_errno(ret);

inode_unlock:
ocfs2_inode_unlock(new_inode, 1);
brelse(new_bh);
Expand Down
Loading

0 comments on commit 9c864e1

Please sign in to comment.