ocfs2 fixes
PATCH 1/1 ocfs2 fixes
Ok, sending this patch set again. It seems to have fallen off the stack, probably because my timing sucked, and I mailed it out just after -rc4 was released :/
Some OCFS2 bug fixes, and a couple configfs ones. All of them are issues that folks have actually hit.
Please pull from 'upstream-linus' branch ofgit://oss.oracle.com/home/sourcebo/git/ocfs2.git
to receive the following updates:
fs/Makefile | 2 fs/configfs/dir.c | 137 +++++++++++++++++++++++++++++++++++--------------- fs/ocfs2/aops.c | 46 ++++++++++++++-- fs/ocfs2/aops.h | 4 - fs/ocfs2/extent_map.c | 6 +- fs/ocfs2/file.c | 86 ++++++++++++++++++++++--------- fs/ocfs2/journal.c | 8 +- fs/ocfs2/uptodate.c | 4 - fs/ocfs2/vote.c | 6 +- 9 files changed, 213 insertions(+), 86 deletions(-)
Joel Becker:
configfs: Fix a reference leak in configfs_mkdir().
configfs: configfs_mkdir() failed to cleanup linkage.
configfs: Make sure configfs_init() is called before consumers.
Mark Fasheh:
ocfs2: take data locks around extend
ocfs2: take meta data lock in ocfs2_file_aio_read()
ocfs2: Don't populate uptodate cache in ocfs2_force_read_journal()
Sunil Mushran:
ocfs2: fix gfp mask in some file system paths
fs/Makefile +1 -1
@@ -45,6 +45,7 @@ obj-$(CONFIG_DNOTIFY) += dnotify.o obj-$(CONFIG_PROC_FS) += proc/ obj-y += partitions/ obj-$(CONFIG_SYSFS) += sysfs/ +obj-$(CONFIG_CONFIGFS_FS) += configfs/ obj-y += devpts/ obj-$(CONFIG_PROFILING) += dcookies.o
@@ -100,5 +101,4 @@ obj-$(CONFIG_BEFS_FS) += befs/ obj-$(CONFIG_HOSTFS) += hostfs/ obj-$(CONFIG_HPPFS) += hppfs/ obj-$(CONFIG_DEBUG_FS) += debugfs/ -obj-$(CONFIG_CONFIGFS_FS) += configfs/ obj-$(CONFIG_OCFS2_FS) += ocfs2/
fs/configfs/dir.c +96 -41
225 lines not on this page · raw message
fs/ocfs2/aops.c +39 -7
74 lines not on this page · raw message
fs/ocfs2/aops.h +2 -2
@@ -22,8 +22,8 @@#ifndef OCFS2_AOPS_H #define OCFS2_AOPS_H -int ocfs2_prepare_write (struct file *file,struct page *page, -unsigned from,unsigned to); +int ocfs2_prepare_write_nolock (struct inode *inode,struct page *page, +unsigned from,unsigned to); struct ocfs2_journal_handle *ocfs2_start_walk_page_trans(struct inode *inode, struct page *page,
fs/ocfs2/extent_map.c +3 -3
@@ -569,7 +569,7 @@ static int ocfs2_extent_map_insert(struc ret = -ENOMEM ; ctxt.new_ent =kmem_cache_alloc (ocfs2_em_ent_cachep, -GFP_KERNEL ); +GFP_NOFS );if (!ctxt.new_ent) {mlog_errno (ret);return ret;
@@ -583,14 +583,14 @@ static int ocfs2_extent_map_insert(strucif (ctxt.need_left && !ctxt.left_ent) { ctxt.left_ent =kmem_cache_alloc (ocfs2_em_ent_cachep, -GFP_KERNEL ); +GFP_NOFS );if (!ctxt.left_ent)break ; }if (ctxt.need_right && !ctxt.right_ent) { ctxt.right_ent =kmem_cache_alloc (ocfs2_em_ent_cachep, -GFP_KERNEL ); +GFP_NOFS );if (!ctxt.right_ent)break ; }
fs/ocfs2/file.c +62 -24
150 lines not on this page · raw message
fs/ocfs2/journal.c +5 -3
@@ -117,7 +117,7 @@ struct ocfs2_journal_handle *ocfs2_alloc {struct ocfs2_journal_handle *retval =NULL ; - retval =kcalloc (1 ,sizeof (*retval),GFP_KERNEL ); + retval =kcalloc (1 ,sizeof (*retval),GFP_NOFS );if (!retval) {mlog (ML_ERROR ,"Failed to allocate memory for journal " "handle!\n" );
@@ -870,9 +870,11 @@ #define CONCURRENT_JOURNAL_FILL 32if (p_blocks >CONCURRENT_JOURNAL_FILL ) p_blocks =CONCURRENT_JOURNAL_FILL ; +/* We are reading journal data which should not +* be put in the uptodate cache */ status =ocfs2_read_blocks (OCFS2_SB (inode->i_sb), p_blkno, p_blocks, bhs,0 , - inode); +NULL );if (status <0 ) {mlog_errno (status); goto bail;
@@ -982,7 +984,7 @@ static void ocfs2_queue_recovery_complet {struct ocfs2_la_recovery_item *item; - item =kmalloc (sizeof (struct ocfs2_la_recovery_item ),GFP_KERNEL ); + item =kmalloc (sizeof (struct ocfs2_la_recovery_item ),GFP_NOFS );if (!item) {/* Though we wish to avoid it, we are in fact safe in * skipping local alloc cleanup as fsck.ocfs2 is more
fs/ocfs2/uptodate.c +2 -2
@@ -337,7 +337,7 @@ static void __ocfs2_set_buffer_uptodate( (unsigned long long )oi->ip_blkno, (unsigned long long)block, expand_tree); - new =kmem_cache_alloc (ocfs2_uptodate_cachep,GFP_KERNEL ); + new =kmem_cache_alloc (ocfs2_uptodate_cachep,GFP_NOFS );if (!new) {mlog_errno (-ENOMEM );return ;
@@ -349,7 +349,7 @@ static void __ocfs2_set_buffer_uptodate(* has no way of tracking that. */ for (i =0 ; i <OCFS2_INODE_MAX_CACHE_ARRAY ; i++) { tree[i] =kmem_cache_alloc (ocfs2_uptodate_cachep, -GFP_KERNEL ); +GFP_NOFS );if (!tree[i]) {mlog_errno (-ENOMEM ); goto out_free;
fs/ocfs2/vote.c +3 -3
@@ -586,7 +586,7 @@ static struct ocfs2_net_wait_ctxt *ocfs2 {struct ocfs2_net_wait_ctxt *w; - w =kcalloc (1 ,sizeof (*w),GFP_KERNEL ); + w =kcalloc (1 ,sizeof (*w),GFP_NOFS );if (!w) {mlog_errno (-ENOMEM ); goto bail;
@@ -749,7 +749,7 @@ static struct ocfs2_vote_msg * ocfs2_newBUG_ON (!ocfs2_is_valid_vote_request (type)); - request =kcalloc (1 ,sizeof (*request),GFP_KERNEL ); + request =kcalloc (1 ,sizeof (*request),GFP_NOFS );if (!request) {mlog_errno (-ENOMEM ); }else {
@@ -1129,7 +1129,7 @@ static int ocfs2_handle_vote_message(strstruct ocfs2_super *osb = data;struct ocfs2_vote_work *work; - work =kmalloc (sizeof (struct ocfs2_vote_work ),GFP_KERNEL ); + work =kmalloc (sizeof (struct ocfs2_vote_work ),GFP_NOFS );if (!work) { status = -ENOMEM ;mlog_errno (status);