Re: GFS

From: David Teigland
Date: Mon Aug 08 2005 - 05:51:57 EST


On Mon, Aug 08, 2005 at 01:18:45PM +0300, Pekka J Enberg wrote:

> gfs2-02.patch:+ RETRY_MALLOC(ip = kmem_cache_alloc(gfs2_inode_cachep,
> -> GFP_NOFAIL.

Already gone, inode_create() can return an error.

if (create) {
RETRY_MALLOC(page = grab_cache_page(aspace->i_mapping, index),
page);
} else {
page = find_lock_page(aspace->i_mapping, index);
if (!page)
return NULL;
}

> I think you can set aspace->flags to GFP_NOFAIL

will try that

> but why can't you return NULL here on failure like you do for
> find_lock_page()?

because create is set

> gfs2-02.patch:+ RETRY_MALLOC(bd = kmem_cache_alloc(gfs2_bufdata_cachep,
> GFP_KERNEL),
> -> GFP_NOFAIL

It looks to me like NOFAIL does nothing for kmem_cache_alloc().
Am I seeing that wrong?

> gfs2-10.patch:+ RETRY_MALLOC(new_gh = gfs2_holder_get(gl, state,
> gfs2_holder_get uses kmalloc which can use GFP_NOFAIL.

Which means adding a new gfp_flags parameter... fine.

Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/