All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: David Howells <dhowells@redhat.com>
Cc: ceph-devel@vger.kernel.org, idryomov@gmail.com,
	linux-fsdevel@vger.kernel.org, linux-cachefs@redhat.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] ceph: conversion to new fscache API
Date: Mon, 06 Dec 2021 05:59:57 -0500	[thread overview]
Message-ID: <dfd01818f8de7e47b3f8bc56550f6db0e977be76.camel@kernel.org> (raw)
In-Reply-To: <1219681.1638784646@warthog.procyon.org.uk>

On Mon, 2021-12-06 at 09:57 +0000, David Howells wrote:
> Jeff Layton <jlayton@kernel.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.
> 

Returning an error there sounds like a better thing to do.

I'll make the other changes you suggested now. Let me know if you change
the fscache_acquire_volume return.

> > +#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
> 

-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2021-12-06 11:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29 16:29 [PATCH 0/2] ceph: adapt ceph to the fscache rewrite Jeff Layton
2021-11-29 16:29 ` [PATCH 1/2] ceph: conversion to new fscache API Jeff Layton
2021-11-29 16:46   ` David Howells
2021-12-01 11:31     ` Jeff Layton
2021-12-06  9:57   ` David Howells
2021-12-06 10:59     ` Jeff Layton [this message]
2021-11-29 16:29 ` [PATCH 2/2] ceph: add fscache writeback support Jeff Layton
2021-12-06 11:12   ` David Howells
  -- strict thread matches above, loose matches on Subject: below --
2021-10-25 13:24 [PATCH 0/2] ceph: conversion to fscache API rewrite Jeff Layton
2021-10-25 13:24 ` [PATCH 1/2] ceph: conversion to new fscache API Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dfd01818f8de7e47b3f8bc56550f6db0e977be76.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dhowells@redhat.com \
    --cc=idryomov@gmail.com \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.