public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: "홍신 shin hong" <hongshin@gmail.com>, linux-ext4@vger.kernel.org
Subject: Re: a question for i_inode's i_size in ext2
Date: Sat, 20 Sep 2008 02:35:02 -0400	[thread overview]
Message-ID: <20080920063502.GB12762@mit.edu> (raw)
In-Reply-To: <20080920032522.GB9633@atrey.karlin.mff.cuni.cz>

On Sat, Sep 20, 2008 at 05:25:22AM +0200, Jan Kara wrote:
> Reading i_size is a different matter - see
> i_size_read function. We use seqlock for that - essentially we use an
> atomic counter which is incremented on every change of i_size and check
> that it's value before we started reading i_size and after we have
> finished reading it has not changed. I hope this helps.

Just to clarify for Shin Hong's benefit: this is necessary only on SMP
(or CONFIG_PREEMPT) 32-bit platforms in order to make sure we read a
coherent 64-bit i_size value.

						- Ted

  reply	other threads:[~2008-09-20  6:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-19  7:21 a question for i_inode's i_size in ext2 홍신 shin hong
2008-09-19 23:32 ` Theodore Tso
2008-09-20  3:25 ` Jan Kara
2008-09-20  6:35   ` Theodore Tso [this message]
     [not found]     ` <2014bcab0809252152i6fef9babx242e821c4f0d5a7b@mail.gmail.com>
2008-09-26  4:53       ` 홍신 shin hong
2008-09-26 14:41       ` Theodore Tso

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=20080920063502.GB12762@mit.edu \
    --to=tytso@mit.edu \
    --cc=hongshin@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@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