Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168991
b: refs/heads/master
c: c8a79c3
h: refs/heads/master
i:
  168989: f25e63f
  168987: ac3328d
  168983: ef94b0e
  168975: b76cc30
  168959: 490e891
v: v3
  • Loading branch information
Russell King committed Nov 22, 2009
1 parent be338a5 commit bef4b4b
Show file tree
Hide file tree
Showing 11 changed files with 100 additions and 33 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: 81065518eda14ebbce1b48c98d5077b0a059d4a3
refs/heads/master: c8a79c3da1ee5dcdbf6db829554fe3d9e68a88ab
6 changes: 3 additions & 3 deletions trunk/Documentation/filesystems/ocfs2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ 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 <mark.fasheh@oracle.com>
Mark Fasheh <mfasheh@suse.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 @@ -70,7 +71,6 @@ 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
6 changes: 6 additions & 0 deletions trunk/arch/arm/include/asm/kmap_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@ enum km_type {
KM_TYPE_NR
};

#ifdef CONFIG_DEBUG_HIGHMEM
#define KM_NMI (-1)
#define KM_NMI_PTE (-1)
#define KM_IRQ_PTE (-1)
#endif

#endif
9 changes: 7 additions & 2 deletions trunk/drivers/i2c/busses/i2c-pnx.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
#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 @@ -54,6 +56,9 @@ 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 Expand Up @@ -645,7 +650,7 @@ static int __devinit i2c_pnx_probe(struct platform_device *pdev)
return 0;

out_irq:
free_irq(alg_data->irq, alg_data);
free_irq(alg_data->irq, i2c_pnx->adapter);
out_clock:
i2c_pnx->set_clock_stop(pdev);
out_unmap:
Expand All @@ -664,7 +669,7 @@ static int __devexit i2c_pnx_remove(struct platform_device *pdev)
struct i2c_adapter *adap = i2c_pnx->adapter;
struct i2c_pnx_algo_data *alg_data = adap->algo_data;

free_irq(alg_data->irq, alg_data);
free_irq(alg_data->irq, i2c_pnx->adapter);
i2c_del_adapter(adap);
i2c_pnx->set_clock_stop(pdev);
iounmap((void *)alg_data->ioaddr);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/watchdog/pnx4008_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ static int __devexit pnx4008_wdt_remove(struct platform_device *pdev)

static struct platform_driver platform_wdt_driver = {
.driver = {
.name = "watchdog",
.name = "pnx4008-watchdog",
.owner = THIS_MODULE,
},
.probe = pnx4008_wdt_probe,
Expand Down Expand Up @@ -352,4 +352,4 @@ MODULE_PARM_DESC(nowayout,

MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
MODULE_ALIAS("platform:watchdog");
MODULE_ALIAS("platform:pnx4008-watchdog");
3 changes: 2 additions & 1 deletion trunk/fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1712,7 +1712,8 @@ 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_HAS_REFCOUNT_FL) ||
OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL)
return 0;

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

/* For union ocfs2_dlm_lksb */
#include "stackglue.h"
Expand Down
69 changes: 64 additions & 5 deletions trunk/fs/ocfs2/refcounttree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3743,6 +3743,9 @@ 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 @@ -3769,6 +3772,7 @@ 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 @@ -3858,6 +3862,49 @@ 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 @@ -3997,6 +4044,14 @@ 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 @@ -4013,10 +4068,6 @@ 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 @@ -4068,9 +4119,17 @@ 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
20 changes: 13 additions & 7 deletions trunk/fs/ocfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,18 +773,20 @@ static int ocfs2_sb_probe(struct super_block *sb,
if (tmpstat < 0) {
status = tmpstat;
mlog_errno(status);
goto bail;
break;
}
di = (struct ocfs2_dinode *) (*bh)->b_data;
memset(stats, 0, sizeof(struct ocfs2_blockcheck_stats));
spin_lock_init(&stats->b_lock);
status = ocfs2_verify_volume(di, *bh, blksize, stats);
if (status >= 0)
goto bail;
brelse(*bh);
*bh = NULL;
if (status != -EAGAIN)
tmpstat = ocfs2_verify_volume(di, *bh, blksize, stats);
if (tmpstat < 0) {
brelse(*bh);
*bh = NULL;
}
if (tmpstat != -EAGAIN) {
status = tmpstat;
break;
}
}

bail:
Expand Down Expand Up @@ -1645,6 +1647,10 @@ static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf)
buf->f_bavail = buf->f_bfree;
buf->f_files = numbits;
buf->f_ffree = freebits;
buf->f_fsid.val[0] = crc32_le(0, osb->uuid_str, OCFS2_VOL_UUID_LEN)
& 0xFFFFFFFFUL;
buf->f_fsid.val[1] = crc32_le(0, osb->uuid_str + OCFS2_VOL_UUID_LEN,
OCFS2_VOL_UUID_LEN) & 0xFFFFFFFFUL;

brelse(bh);

Expand Down
5 changes: 0 additions & 5 deletions trunk/fs/ocfs2/uptodate.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@
#include <linux/highmem.h>
#include <linux/buffer_head.h>
#include <linux/rbtree.h>
#ifndef CONFIG_OCFS2_COMPAT_JBD
# include <linux/jbd2.h>
#else
# include <linux/jbd.h>
#endif

#define MLOG_MASK_PREFIX ML_UPTODATE

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/i2c-pnx.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct i2c_pnx_mif {
int mode; /* Interface mode */
struct completion complete; /* I/O completion */
struct timer_list timer; /* Timeout */
char * buf; /* Data buffer */
u8 * buf; /* Data buffer */
int len; /* Length of data buffer */
};

Expand Down

0 comments on commit bef4b4b

Please sign in to comment.