mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: dhowells@redhat.com, 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 09:57:26 +0000	[thread overview]
Message-ID: <1219681.1638784646@warthog.procyon.org.uk> (raw)
In-Reply-To: <20211129162907.149445-2-jlayton@kernel.org>

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.

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


  parent reply	other threads:[~2021-12-06  9:57 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:29 ` [PATCH 2/2] ceph: add fscache writeback support Jeff Layton
2021-11-29 16:46 ` [PATCH 1/2] ceph: conversion to new fscache API David Howells
2021-12-01 11:31   ` Jeff Layton
2021-12-06  9:57 ` David Howells [this message]
2021-12-06 10:59   ` Jeff Layton
2021-12-06 11:12 ` [PATCH 2/2] ceph: add fscache writeback support 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=1219681.1638784646@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®