linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dominique Martinet <asmadeus@codewreck.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: v9fs-developer@lists.sourceforge.net,
	Linux List Kernel Mailing <linux-kernel@vger.kernel.org>,
	Netdev <netdev@vger.kernel.org>
Subject: Re: [GIT PULL] 9p updates for 5.1
Date: Mon, 18 Mar 2019 01:04:02 +0100	[thread overview]
Message-ID: <20190318000402.GA24768@nautica> (raw)
In-Reply-To: <CAHk-=wgywWzGP-UszbL4csXpk4_h0w5PbkZYdaTpBzue82btfQ@mail.gmail.com>

Linus Torvalds wrote on Sun, Mar 17, 2019:
> Hmm. I wonder what makes it valid to have concurrent updates to
> i_size? Yes, yes, you added that spinlock to make the update itself
> atomic on 32-bit, but it sounds a bit odd in the first place to have
> two things possibly changing the size of a file at the same time...

If the inode attributes are currently invalid (for example after
v9fs_invalidate_inode_attr()) then two concurrent user getattr requests
for the same inode will send two network requests which can both update
the i_size.

With cache=fscache or loose a write could also be concurrent with such
an update.


I plan on improving the first case with some "being revalidated" logic
now this pattern got reported but I don't think the second one can be
avoided, so that fix is still necessary in the long run afaict.


Thanks,
-- 
Dominique

  reply	other threads:[~2019-03-18  0:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-17 14:25 [GIT PULL] 9p updates for 5.1 Dominique Martinet
2019-03-17 16:15 ` Linus Torvalds
2019-03-18  0:04   ` Dominique Martinet [this message]
2019-03-17 16:45 ` pr-tracker-bot

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=20190318000402.GA24768@nautica \
    --to=asmadeus@codewreck.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=v9fs-developer@lists.sourceforge.net \
    /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).