linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Andreas Gruenbacher <agruenba@redhat.com>
Cc: cluster-devel@redhat.com, Christoph Hellwig <hch@lst.de>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v5 14/14] gfs2: Handle stuffed files in iomap_{begin,end}
Date: Wed, 30 May 2018 11:57:36 +0200	[thread overview]
Message-ID: <20180530095736.GA31068@lst.de> (raw)
In-Reply-To: <20180530094842.13559-15-agruenba@redhat.com>

> +	if (gfs2_is_stuffed(ip)) {
> +		unstuff = pos + length > gfs2_max_stuffed_size(ip);
> +
> +		if (!unstuff) {
> +			iomap->page = grab_cache_page_write_begin(
> +					inode->i_mapping, 0, flags);
> +			ret = -ENOMEM;
> +			if (!iomap->page)
> +				goto out;
> +
> +			if (!PageUptodate(iomap->page)) {
> +				ret = stuffed_readpage(ip, iomap->page);
> +				if (ret)
> +					goto out;
> +			}
> +		}
> +	}

grab_cache_page_write_begin needs to remain in iomap.  Please just
set up a pointer for later copying here.

This will be important to support e.g. iomap_readpage(s) and to easily
support direct I/O from inline data (just copy to/from the stuffed
data pointer in iomap).

  reply	other threads:[~2018-05-30  9:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-30  9:48 [PATCH v5 00/14] gfs2 iomap write support Andreas Gruenbacher
2018-05-30  9:48 ` [PATCH v5 01/14] gfs2: Update find_metapath comment Andreas Gruenbacher
2018-05-30  9:48 ` [PATCH v5 02/14] gfs2: hole_size improvement Andreas Gruenbacher
2018-05-30  9:48 ` [PATCH v5 03/14] gfs2: gfs2_stuffed_write_end cleanup Andreas Gruenbacher
2018-05-30  9:48 ` [PATCH v5 04/14] gfs2: Remove ordered write mode handling from gfs2_trans_add_data Andreas Gruenbacher
2018-05-30  9:48 ` [PATCH v5 05/14] gfs2: Iomap cleanups and improvements Andreas Gruenbacher
2018-05-30  9:48 ` [PATCH v5 06/14] iomap: Add write_{begin,end} iomap operations Andreas Gruenbacher
2018-05-30  9:48 ` [PATCH v5 07/14] iomap: Mark newly allocated buffer heads as new Andreas Gruenbacher
2018-05-30  9:48 ` [PATCH v5 08/14] gfs2: iomap buffered write support Andreas Gruenbacher
2018-05-30  9:48 ` [PATCH v5 09/14] gfs2: gfs2_extent_length cleanup Andreas Gruenbacher
2018-05-30  9:48 ` [PATCH v5 10/14] iomap: Complete partial direct I/O writes synchronously Andreas Gruenbacher
2018-05-30  9:48 ` [PATCH v5 11/14] gfs2: iomap direct I/O support Andreas Gruenbacher
2018-05-30  9:48 ` [PATCH v5 12/14] gfs2: Remove gfs2_write_{begin,end} Andreas Gruenbacher
2018-05-30  9:48 ` [PATCH v5 13/14] iomap: inline data should be an iomap type, not a flag Andreas Gruenbacher
2018-05-30  9:48 ` [PATCH v5 14/14] gfs2: Handle stuffed files in iomap_{begin,end} Andreas Gruenbacher
2018-05-30  9:57   ` Christoph Hellwig [this message]
2018-05-30 15:48 ` [Cluster-devel] [PATCH v5 00/14] gfs2 iomap write support Bob Peterson

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=20180530095736.GA31068@lst.de \
    --to=hch@lst.de \
    --cc=agruenba@redhat.com \
    --cc=cluster-devel@redhat.com \
    --cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).