linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Kleikamp <shaggy@austin.ibm.com>
To: David Sanchez <david.sanchez@lexbox.fr>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: mark_inode_dirty vs mark_inode_dirty_sync
Date: Fri, 02 Sep 2005 07:42:39 -0500	[thread overview]
Message-ID: <1125664959.9401.15.camel@kleikamp.austin.ibm.com> (raw)
In-Reply-To: <17AB476A04B7C842887E0EB1F268111E026F3E@xpserver.intra.lexbox.org>

On Fri, 2005-09-02 at 11:55 +0200, David Sanchez wrote:
> Hi,
> Please, could somebody explain me what the mark_inode_dirty* functions
> do and what is the difference between mark_inode_dirty and
> mark_inode_dirty_sync ?

They put the inode on the superblock's dirty list and make the inode as
dirty in the i_state field.  This makes sure that the inode will
eventually be written to disk.

mark_inode_dirty_sync only sets the I_DIRTY_SYNC flag, which does not
imply that any file data was changed.  It is called when a minor change
is made to an inode, such as a timestamp is changed.  Some sync
operations will only write the inode if data was written, so can avoid
writing the an inode that is only dirtied by I_DIRTY_SYNC.

mark_inode_dirty sets I_DIRTY which is I_DIRTY_SYNC | I_DIRTY_DATASYNC |
I_DIRTY_PAGES.  This indicates that the in-memory inode has changes to
the data that have not yet been written to disk.

Shaggy
-- 
David Kleikamp
IBM Linux Technology Center


  reply	other threads:[~2005-09-02 12:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-02  9:55 mark_inode_dirty vs mark_inode_dirty_sync David Sanchez
2005-09-02 12:42 ` Dave Kleikamp [this message]
     [not found]   ` <20050902164649.GW7054@schatzie.adilger.int>
2005-09-02 19:05     ` [PATCH] document mark_inode_dirty & mark_inode_dirty_sync in fs.h Dave Kleikamp

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=1125664959.9401.15.camel@kleikamp.austin.ibm.com \
    --to=shaggy@austin.ibm.com \
    --cc=david.sanchez@lexbox.fr \
    --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).