linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Artem Bityutskiy <dedekind1@nokia.com>
Cc: Jens Axboe <jens.axboe@oracle.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] VFS: introduce helpers for manipulation s_dirty flag
Date: Wed, 08 Jul 2009 13:09:20 +0300	[thread overview]
Message-ID: <4A547050.20606@panasas.com> (raw)
In-Reply-To: <20090707180548.17048.74367.sendpatchset@localhost.localdomain>

On 07/07/2009 09:05 PM, Artem Bityutskiy wrote:
> From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> Subject: [PATCH] VFS: introduce helpers for manipulation s_dirty flag
> 
> This patch introduces 3 new VFS helpers: 'mark_sb_dirty()',
> 'mark_sb_clean()', and 'is_sb_dirty()'. The helpers simply
> set 'sb->s_dirt' or test 'sb->s_dirt'. The plan is to make
> every FS use these helpers instead of manipulating
> 'sb->s_dirt' directly.
> 
> This patch also makes all file-systems use the helpers.
> 
> This patch is just a preparation for further periodic write-back
> timer optimizations. No functional changes yet.
> 
> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> ---
>  fs/exofs/inode.c      |    2 +-
>  fs/exofs/super.c      |    6 +++---
<snip>
> diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
> index 77d0a29..cb20f1c 100644
> --- a/fs/exofs/inode.c
> +++ b/fs/exofs/inode.c
> @@ -1066,7 +1066,7 @@ struct inode *exofs_new_inode(struct inode *dir, int mode)
>  
>  	sbi = sb->s_fs_info;
>  
> -	sb->s_dirt = 1;
> +	mark_sb_dirty(sb);
>  	inode->i_uid = current->cred->fsuid;
>  	if (dir->i_mode & S_ISGID) {
>  		inode->i_gid = dir->i_gid;
> diff --git a/fs/exofs/super.c b/fs/exofs/super.c
> index 8216c5b..14263ff 100644
> --- a/fs/exofs/super.c
> +++ b/fs/exofs/super.c
> @@ -241,7 +241,7 @@ static int exofs_sync_fs(struct super_block *sb, int wait)
>  		EXOFS_ERR("exofs_write_super: exofs_sync_op failed.\n");
>  		goto out;
>  	}
> -	sb->s_dirt = 0;
> +	mark_sb_clean(sb);
>  
>  out:
>  	if (or)
> @@ -257,7 +257,7 @@ static void exofs_write_super(struct super_block *sb)
>  	if (!(sb->s_flags & MS_RDONLY))
>  		exofs_sync_fs(sb, 1);
>  	else
> -		sb->s_dirt = 0;
> +		mark_sb_clean(sb);
>  }
>  
>  /*
> @@ -271,7 +271,7 @@ static void exofs_put_super(struct super_block *sb)
>  
>  	lock_kernel();
>  
> -	if (sb->s_dirt)
> +	if (is_sb_dirty(sb))
>  		exofs_write_super(sb);
>  
>  	/* make sure there are no pending commands */
<snip>

I have just asked a pull request from Linus with a patch that adds
one more "if (sb->s_dirt)" call site. So if he pulls it into 2.6.31-rc3
I'll send you a mail and you can update. If not then it will go in at
2.6.32, please tel me when this is going into linux-next and through which
tree, and I'll sync with it.

Boaz

  reply	other threads:[~2009-07-08 10:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-07 18:05 [PATCH 0/2] periodic sync_supers timer optimization Artem Bityutskiy
2009-07-07 18:05 ` [PATCH 1/2] VFS: introduce helpers for manipulation s_dirty flag Artem Bityutskiy
2009-07-08 10:09   ` Boaz Harrosh [this message]
2009-07-08 15:32     ` Artem Bityutskiy
2009-07-07 18:05 ` [PATCH 2/2] writeback: optimize periodic sync_supers Artem Bityutskiy

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=4A547050.20606@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=dedekind1@nokia.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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).