[PATCH take 3 02/29] VFS: export sync_sb_inodes

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: LKML <linux-kernel@...>
Cc: Adrian Hunter <ext-adrian.hunter@...>, Artem Bityutskiy <Artem.Bityutskiy@...>
Date: Monday, May 26, 2008 - 10:05 am

This patch exports the 'sync_sb_inodes()' which is needed for
UBIFS because it have to force write-back from time to time.
Namely, the UBIFS budgeting subsystem forces write-back when
its pessimistic callculations show that there is not free
space on the media.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
 fs/fs-writeback.c  |   11 +++++++++--
 include/linux/fs.h |    2 ++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 16519fe..25adfc3 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -439,8 +439,8 @@ __writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
  * on the writer throttling path, and we get decent balancing between many
  * throttled threads: we don't want them all piling up on inode_sync_wait.
  */
-static void
-sync_sb_inodes(struct super_block *sb, struct writeback_control *wbc)
+void generic_sync_sb_inodes(struct super_block *sb,
+				struct writeback_control *wbc)
 {
 	const unsigned long start = jiffies;	/* livelock avoidance */
 
@@ -526,6 +526,13 @@ sync_sb_inodes(struct super_block *sb, struct writeback_control *wbc)
 	spin_unlock(&inode_lock);
 	return;		/* Leave any unwritten inodes on s_io */
 }
+EXPORT_SYMBOL_GPL(generic_sync_sb_inodes);
+
+static void sync_sb_inodes(struct super_block *sb,
+				struct writeback_control *wbc)
+{
+	generic_sync_sb_inodes(sb, wbc);
+}
 
 /*
  * Start writeback of dirty pagecache data against all unlocked inodes.
diff --git a/include/linux/fs.h b/include/linux/fs.h
index f413085..6a0b9b8 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1730,6 +1730,8 @@ static inline void invalidate_remote_inode(struct inode *inode)
 extern int invalidate_inode_pages2(struct address_space *mapping);
 extern int invalidate_inode_pages2_range(struct address_space *mapping,
 					 pgoff_t start, pgoff_t end);
+extern void generic_sync_sb_inodes(struct super_block *sb,
+				struct writeback_control *wbc);
 extern int write_inode_now(struct inode *, int);
 extern int filemap_fdatawrite(struct address_space *);
 extern int filemap_flush(struct address_space *);
-- 
1.5.4.1

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH take 3] UBIFS - new flash file system, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 01/29] VFS: move inode_lock into sync_sb_inodes, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 20/29] UBIFS: add LEB properties tree, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 17/29] UBIFS: add TNC shrinker, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 24/29] UBIFS: add budgeting, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 26/29] UBIFS: add orphans handling sub-system, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 29/29] UBIFS: include FS to compilation, Artem Bityutskiy, (Mon May 26, 10:05 am)
Re: [PATCH take 3 29/29] UBIFS: include FS to compilation, Artem Bityutskiy, (Wed May 28, 12:57 am)
[PATCH take 3 28/29] UBIFS: add debugging stuff, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 23/29] UBIFS: add VFS operations, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 22/29] UBIFS: add Garbage Collector, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 25/29] UBIFS: add extended attribute support, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 27/29] UBIFS: add header files, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 18/29] UBIFS: add LEB properties, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 21/29] UBIFS: add LEB find subsystem, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 15/29] UBIFS: add TNC implementation, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 19/29] UBIFS: add LEB properties tree, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 12/29] UBIFS: add key helpers, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 16/29] UBIFS: add TNC commit implementation, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 14/29] UBIFS: add commit functionality, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 13/29] UBIFS: add the journal, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 11/29] UBIFS: add compression support, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 10/29] UBIFS: add file-system recovery, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 07/29] UBIFS: add journal replay, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 08/29] UBIFS: add file-system build, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 05/29] UBIFS: add I/O sub-system, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 09/29] UBIFS: add superblock and master node, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 06/29] UBIFS: add flash scanning, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 04/29] UBIFS: add brief documentation, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 03/29] do_mounts: allow UBI root device name, Artem Bityutskiy, (Mon May 26, 10:05 am)
[PATCH take 3 02/29] VFS: export sync_sb_inodes, Artem Bityutskiy, (Mon May 26, 10:05 am)