linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
To: Al Viro <viro@ZenIV.linux.org.uk>, Jens Axboe <jens.axboe@oracle.com>
Cc: linux-fsdevel@vger.kernel.org,
	Artem Bityutskiy <Artem.Bityutskiy@nokia.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v3 15/18] UFS: do not manipulate s_dirt directly
Date: Thu, 09 Jul 2009 11:50:06 +0300	[thread overview]
Message-ID: <20090709085006.12122.73835.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20090709084822.12122.79749.sendpatchset@localhost.localdomain>

... use new VFS helpers instead.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
 fs/ufs/balloc.c |    8 ++++----
 fs/ufs/ialloc.c |    4 ++--
 fs/ufs/super.c  |   12 ++++++------
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c
index 54c16ec..71a6971 100644
--- a/fs/ufs/balloc.c
+++ b/fs/ufs/balloc.c
@@ -122,7 +122,7 @@ void ufs_free_fragments(struct inode *inode, u64 fragment, unsigned count)
 		ubh_ll_rw_block(SWRITE, UCPI_UBH(ucpi));
 		ubh_wait_on_buffer (UCPI_UBH(ucpi));
 	}
-	sb->s_dirt = 1;
+	mark_sb_dirty(sb);
 	
 	unlock_super (sb);
 	UFSD("EXIT\n");
@@ -223,7 +223,7 @@ do_more:
 		goto do_more;
 	}
 
-	sb->s_dirt = 1;
+	mark_sb_dirty(sb);
 	unlock_super (sb);
 	UFSD("EXIT\n");
 	return;
@@ -571,7 +571,7 @@ static u64 ufs_add_fragments(struct inode *inode, u64 fragment,
 		ubh_ll_rw_block(SWRITE, UCPI_UBH(ucpi));
 		ubh_wait_on_buffer (UCPI_UBH(ucpi));
 	}
-	sb->s_dirt = 1;
+	mark_sb_dirty(sb);
 
 	UFSD("EXIT, fragment %llu\n", (unsigned long long)fragment);
 	
@@ -698,7 +698,7 @@ succed:
 		ubh_ll_rw_block(SWRITE, UCPI_UBH(ucpi));
 		ubh_wait_on_buffer (UCPI_UBH(ucpi));
 	}
-	sb->s_dirt = 1;
+	mark_sb_dirty(sb);
 
 	result += cgno * uspi->s_fpg;
 	UFSD("EXIT3, result %llu\n", (unsigned long long)result);
diff --git a/fs/ufs/ialloc.c b/fs/ufs/ialloc.c
index 3527c00..b33cfe6 100644
--- a/fs/ufs/ialloc.c
+++ b/fs/ufs/ialloc.c
@@ -124,7 +124,7 @@ void ufs_free_inode (struct inode * inode)
 		ubh_wait_on_buffer (UCPI_UBH(ucpi));
 	}
 	
-	sb->s_dirt = 1;
+	mark_sb_dirty(sb);
 	unlock_super (sb);
 	UFSD("EXIT\n");
 }
@@ -300,7 +300,7 @@ cg_found:
 		ubh_ll_rw_block(SWRITE, UCPI_UBH(ucpi));
 		ubh_wait_on_buffer (UCPI_UBH(ucpi));
 	}
-	sb->s_dirt = 1;
+	mark_sb_dirty(sb);
 
 	inode->i_ino = cg * uspi->s_ipg + bit;
 	inode->i_mode = mode;
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index 5faed79..6bb1a62 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -237,7 +237,7 @@ void ufs_error (struct super_block * sb, const char * function,
 	if (!(sb->s_flags & MS_RDONLY)) {
 		usb1->fs_clean = UFS_FSBAD;
 		ubh_mark_buffer_dirty(USPI_UBH(uspi));
-		sb->s_dirt = 1;
+		mark_sb_dirty(sb);
 		sb->s_flags |= MS_RDONLY;
 	}
 	va_start (args, fmt);
@@ -270,7 +270,7 @@ void ufs_panic (struct super_block * sb, const char * function,
 	if (!(sb->s_flags & MS_RDONLY)) {
 		usb1->fs_clean = UFS_FSBAD;
 		ubh_mark_buffer_dirty(USPI_UBH(uspi));
-		sb->s_dirt = 1;
+		mark_sb_dirty(sb);
 	}
 	va_start (args, fmt);
 	vsnprintf (error_buf, sizeof(error_buf), fmt, args);
@@ -1149,7 +1149,7 @@ static int ufs_sync_fs(struct super_block *sb, int wait)
 		ufs_set_fs_state(sb, usb1, usb3,
 				UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time));
 	ufs_put_cstotal(sb);
-	sb->s_dirt = 0;
+	mark_sb_clean(sb);
 
 	UFSD("EXIT\n");
 	unlock_kernel();
@@ -1163,7 +1163,7 @@ static void ufs_write_super(struct super_block *sb)
 	if (!(sb->s_flags & MS_RDONLY))
 		ufs_sync_fs(sb, 1);
 	else
-		sb->s_dirt = 0;
+		mark_sb_clean(sb);
 }
 
 static void ufs_put_super(struct super_block *sb)
@@ -1172,7 +1172,7 @@ static void ufs_put_super(struct super_block *sb)
 		
 	UFSD("ENTER\n");
 
-	if (sb->s_dirt)
+	if (is_sb_dirty(sb))
 		ufs_write_super(sb);
 
 	if (!(sb->s_flags & MS_RDONLY))
@@ -1242,7 +1242,7 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
 			ufs_set_fs_state(sb, usb1, usb3,
 				UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time));
 		ubh_mark_buffer_dirty (USPI_UBH(uspi));
-		sb->s_dirt = 0;
+		mark_sb_clean(sb);
 		sb->s_flags |= MS_RDONLY;
 	} else {
 	/*
-- 
1.6.0.6


  parent reply	other threads:[~2009-07-09  6:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-09  8:48 [PATCH v3 00/18] periodic write-back timer optimization Artem Bityutskiy
2009-07-09  8:48 ` [PATCH v3 01/18] VFS: introduce helpers for manipulation s_dirty flag Artem Bityutskiy
2009-07-09  8:48 ` [PATCH v3 02/18] AFFS: do not manipulate s_dirt directly Artem Bityutskiy
2009-07-09  8:48 ` [PATCH v3 03/18] BFS: " Artem Bityutskiy
2009-07-09  8:48 ` [PATCH v3 04/18] EXOFS: " Artem Bityutskiy
2009-07-12  9:53   ` Boaz Harrosh
2009-07-12 14:02     ` Artem Bityutskiy
2009-07-09  8:48 ` [PATCH v3 05/18] EXT2: " Artem Bityutskiy
2009-07-09  8:49 ` [PATCH v3 06/18] EXT4: " Artem Bityutskiy
2009-07-09  8:49 ` [PATCH v3 07/18] FAT: " Artem Bityutskiy
2009-07-09  8:49 ` [PATCH v3 08/18] HFS: " Artem Bityutskiy
2009-07-09  8:49 ` [PATCH v3 09/18] HFSPLUS: " Artem Bityutskiy
2009-07-09  8:49 ` [PATCH v3 10/18] JFFS2: " Artem Bityutskiy
2009-07-09  8:49 ` [PATCH v3 11/18] NILFS: " Artem Bityutskiy
2009-07-09  8:49 ` [PATCH v3 12/18] reiserfs: " Artem Bityutskiy
2009-07-09  8:49 ` [PATCH v3 13/18] SYSV: " Artem Bityutskiy
2009-07-09  8:49 ` [PATCH v3 14/18] UDF: " Artem Bityutskiy
2009-07-09  8:50 ` Artem Bityutskiy [this message]
2009-07-09  8:50 ` [PATCH v3 16/18] VFS: use is_sb_dirty helper Artem Bityutskiy
2009-07-09  8:50 ` [PATCH v3 17/18] rename s_dirt to s_dirty Artem Bityutskiy
2009-07-09  8:50 ` [PATCH v3 18/18] writeback: optimize periodic sync_supers Artem Bityutskiy
2009-07-09 12:37 ` [PATCH v3 00/18] periodic write-back timer optimization Andi Kleen
2009-07-09 13:04   ` Artem Bityutskiy
2009-07-15  6:21 ` Artem Bityutskiy
2009-07-24 15:45   ` Artem Bityutskiy
2009-09-14 15:27     ` 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=20090709085006.12122.73835.sendpatchset@localhost.localdomain \
    --to=artem.bityutskiy@nokia.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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).