All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Grünbacher" <andreas.gruenbacher@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Andreas Gruenbacher <agruenba@redhat.com>,
	cluster-devel <cluster-devel@redhat.com>,
	Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH v7 05/12] fs: allow to always dirty inode in __generic_write_end
Date: Mon, 4 Jun 2018 18:24:21 +0200	[thread overview]
Message-ID: <CAHpGcMJNRpwrpSa+r465JsUpExVb7TcBY784Ptdz79ciOQMXjg@mail.gmail.com> (raw)
In-Reply-To: <20180604124850.GA30780@lst.de>

2018-06-04 14:48 GMT+02:00 Christoph Hellwig <hch@lst.de>:
> On Mon, Jun 04, 2018 at 02:37:22PM +0200, Andreas Gruenbacher wrote:
>> @@ -2106,7 +2105,7 @@ int __generic_write_end(struct inode *inode, loff_t pos, unsigned copied,
>>        * ordering of page lock and transaction start for journaling
>>        * filesystems.
>>        */
>> -     if (i_size_changed)
>> +     if (dirty_inode)
>>               mark_inode_dirty(inode);
>>       return copied;
>
> Calling mark_inode_dirty on an already dirty inode is cheap, so how
> about just calling it directly in your caller that always wants to
> set the inode dirty?

The dirty_inode hook is where gfs2 converts the in-core inode into the
on-disk format (the equivalent of xfs_inode_to_disk), so it's not
quite that cheap. I realize this could be done differently in gfs2,
but that's not where we stand today, and I really can't fix ten things
all at the same time.

Thanks,
Andreas

WARNING: multiple messages have this Message-ID (diff)
From: Andreas Grünbacher <andreas.gruenbacher@gmail.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH v7 05/12] fs: allow to always dirty inode in __generic_write_end
Date: Mon, 4 Jun 2018 18:24:21 +0200	[thread overview]
Message-ID: <CAHpGcMJNRpwrpSa+r465JsUpExVb7TcBY784Ptdz79ciOQMXjg@mail.gmail.com> (raw)
In-Reply-To: <20180604124850.GA30780@lst.de>

2018-06-04 14:48 GMT+02:00 Christoph Hellwig <hch@lst.de>:
> On Mon, Jun 04, 2018 at 02:37:22PM +0200, Andreas Gruenbacher wrote:
>> @@ -2106,7 +2105,7 @@ int __generic_write_end(struct inode *inode, loff_t pos, unsigned copied,
>>        * ordering of page lock and transaction start for journaling
>>        * filesystems.
>>        */
>> -     if (i_size_changed)
>> +     if (dirty_inode)
>>               mark_inode_dirty(inode);
>>       return copied;
>
> Calling mark_inode_dirty on an already dirty inode is cheap, so how
> about just calling it directly in your caller that always wants to
> set the inode dirty?

The dirty_inode hook is where gfs2 converts the in-core inode into the
on-disk format (the equivalent of xfs_inode_to_disk), so it's not
quite that cheap. I realize this could be done differently in gfs2,
but that's not where we stand today, and I really can't fix ten things
all at the same time.

Thanks,
Andreas



  reply	other threads:[~2018-06-04 16:24 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04 12:37 [PATCH v7 00/12] gfs2 iomap write support Andreas Gruenbacher
2018-06-04 12:37 ` [Cluster-devel] " Andreas Gruenbacher
2018-06-04 12:37 ` [PATCH v7 01/12] iomap: inline data should be an iomap type, not a flag Andreas Gruenbacher
2018-06-04 12:37   ` [Cluster-devel] " Andreas Gruenbacher
2018-06-04 12:37 ` [PATCH v7 02/12] iomap: Mark newly allocated buffer heads as new Andreas Gruenbacher
2018-06-04 12:37   ` [Cluster-devel] " Andreas Gruenbacher
2018-06-04 12:37 ` [PATCH v7 03/12] iomap: Complete partial direct I/O writes synchronously Andreas Gruenbacher
2018-06-04 12:37   ` [Cluster-devel] " Andreas Gruenbacher
2018-06-04 12:37 ` [PATCH v7 04/12] fs: factor out a __generic_write_end helper Andreas Gruenbacher
2018-06-04 12:37   ` [Cluster-devel] " Andreas Gruenbacher
2018-06-04 12:37 ` [PATCH v7 05/12] fs: allow to always dirty inode in __generic_write_end Andreas Gruenbacher
2018-06-04 12:37   ` [Cluster-devel] " Andreas Gruenbacher
2018-06-04 12:48   ` Christoph Hellwig
2018-06-04 12:48     ` [Cluster-devel] " Christoph Hellwig
2018-06-04 16:24     ` Andreas Grünbacher [this message]
2018-06-04 16:24       ` Andreas Grünbacher
2018-06-04 12:37 ` [PATCH v7 06/12] iomap: Generic inline data handling Andreas Gruenbacher
2018-06-04 12:37   ` [Cluster-devel] " Andreas Gruenbacher
2018-06-04 12:37 ` [PATCH v7 07/12] iomap: Add page_write_end iomap hook Andreas Gruenbacher
2018-06-04 12:37   ` [Cluster-devel] " Andreas Gruenbacher
2018-06-04 12:50   ` Christoph Hellwig
2018-06-04 12:50     ` [Cluster-devel] " Christoph Hellwig
2018-06-04 16:40     ` Andreas Grünbacher
2018-06-04 16:40       ` [Cluster-devel] " Andreas Grünbacher
2018-06-04 12:37 ` [PATCH v7 08/12] gfs2: iomap buffered write support Andreas Gruenbacher
2018-06-04 12:37   ` [Cluster-devel] " Andreas Gruenbacher
2018-06-04 12:37 ` [PATCH v7 09/12] gfs2: gfs2_extent_length cleanup Andreas Gruenbacher
2018-06-04 12:37   ` [Cluster-devel] " Andreas Gruenbacher
2018-06-04 12:37 ` [PATCH v7 10/12] gfs2: iomap direct I/O support Andreas Gruenbacher
2018-06-04 12:37   ` [Cluster-devel] " Andreas Gruenbacher
2018-06-04 12:37 ` [PATCH v7 11/12] gfs2: Remove gfs2_write_{begin,end} Andreas Gruenbacher
2018-06-04 12:37   ` [Cluster-devel] [PATCH v7 11/12] gfs2: Remove gfs2_write_{begin, end} Andreas Gruenbacher
2018-06-04 12:37 ` [PATCH v7 12/12] iomap: Put struct iomap_ops into struct iomap Andreas Gruenbacher
2018-06-04 12:37   ` [Cluster-devel] " Andreas Gruenbacher
2018-06-04 12:52   ` Christoph Hellwig
2018-06-04 12:52     ` [Cluster-devel] " Christoph Hellwig
2018-06-04 17:00     ` Andreas Grünbacher
2018-06-04 17:00       ` [Cluster-devel] " Andreas Grünbacher

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=CAHpGcMJNRpwrpSa+r465JsUpExVb7TcBY784Ptdz79ciOQMXjg@mail.gmail.com \
    --to=andreas.gruenbacher@gmail.com \
    --cc=agruenba@redhat.com \
    --cc=cluster-devel@redhat.com \
    --cc=hch@lst.de \
    --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 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.