[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1219681.1638784646@warthog.procyon.org.uk>
Date: Mon, 06 Dec 2021 09:57:26 +0000
From: David Howells <dhowells@...hat.com>
To: Jeff Layton <jlayton@...nel.org>
Cc: dhowells@...hat.com, ceph-devel@...r.kernel.org,
idryomov@...il.com, linux-fsdevel@...r.kernel.org,
linux-cachefs@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] ceph: conversion to new fscache API
Jeff Layton <jlayton@...nel.org> wrote:
> if (!(gfp & __GFP_DIRECT_RECLAIM) || !(gfp & __GFP_FS))
There's a function for the first part of this:
if (!gfpflags_allow_blocking(gfp) || !(gfp & __GFP_FS))
> + fsc->fscache = fscache_acquire_volume(name, NULL, 0);
>
> if (fsc->fscache) {
> ent->fscache = fsc->fscache;
> list_add_tail(&ent->list, &ceph_fscache_list);
It shouldn't really be necessary to have ceph_fscache_list since
fscache_acquire_volume() will do it's own duplicate check. I wonder if I
should make fscache_acquire_volume() return -EEXIST or -EBUSY rather than NULL
in such a case and not print an error, but rather leave that to the filesystem
to display.
That would allow you to get rid of the ceph_fscache_entry struct also, I
think.
> +#define FSCACHE_USE_NEW_IO_API
That doesn't exist anymore.
> + /*
> + * If we're truncating up, then we should be able to just update
> + * the existing cookie.
> + */
> + if (size > isize)
> + ceph_fscache_update(inode);
Might look better to say "expanding" rather than "truncating up".
David
Powered by blists - more mailing lists