#include <linux/sort.h>
#include <linux/gfs2_ondisk.h>
#include <linux/crc32.h>
+#include <linux/vmalloc.h>
#include <asm/semaphore.h>
#include "gfs2.h"
return 0;
error = -ENOMEM;
- larr = kmalloc((leaves + entries) * sizeof(void*), GFP_KERNEL);
+ larr = vmalloc((leaves + entries) * sizeof(void*));
if (!larr)
goto out;
darr = (const struct gfs2_dirent **)(larr + leaves);
out_kfree:
for(i = 0; i < leaf; i++)
brelse(larr[i]);
- kfree(larr);
+ vfree(larr);
out:
return error;
}
struct gfs2_holder *tmp_gh, *safe;
int found = 0;
+ printk(KERN_INFO "recursion %016llx, %u\n", gl->gl_name.ln_number,
+ gl->gl_name.ln_type);
+
if (gfs2_assert_warn(sdp, gh->gh_owner))
return;
#define GL_SYNC 0x00000800
#define GL_NOCANCEL 0x00001000
#define GL_NEVER_RECURSE 0x00002000
+#define GL_AOP 0x00004000
#define GLR_TRYFAILED 13
#define GLR_CANCELED 14
struct gfs2_glock *gh_gl;
struct task_struct *gh_owner;
unsigned int gh_state;
- int gh_flags;
+ unsigned gh_flags;
int gh_error;
unsigned long gh_iflags;
gfs2_ail1_start(sdp, DIO_ALL);
if (gfs2_ail1_empty(sdp, DIO_ALL))
break;
- msleep(100);
+ msleep(10);
}
}
int error;
if (file != &gfs2_internal_file_sentinal) {
- gfs2_holder_init(ip->i_gl, LM_ST_SHARED, GL_ATIME, &gh);
+ gfs2_holder_init(ip->i_gl, LM_ST_SHARED, GL_ATIME|GL_AOP, &gh);
error = gfs2_glock_nq_m_atime(1, &gh);
if (error)
goto out_unlock;
loff_t end = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to;
struct gfs2_alloc *al;
- gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_ATIME, &ip->i_gh);
+ gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_ATIME|GL_AOP, &ip->i_gh);
error = gfs2_glock_nq_m_atime(1, &ip->i_gh);
if (error)
goto out_uninit;
if (error)
goto out_gunlock_q;
- error = gfs2_trans_begin(sdp,
- sdp->sd_max_dirres +
+ error = gfs2_trans_begin(sdp, sdp->sd_max_dirres +
al->al_rgd->rd_ri.ri_length +
4 * RES_DINODE + 4 * RES_LEAF +
RES_UNLINKED + RES_STATFS +
/* At this point, we're through participating in the lockspace */
gfs2_sys_fs_del(sdp);
-
vfree(sdp);
-
sb->s_fs_info = NULL;
}