summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-05-18 20:28:10 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-05-18 20:28:10 -0700
commitafd64673856195f13be45d0a46462f868e48db28 (patch)
treee7e4cfe246fab66ca4995cbf6b117f4cc74080d0 /include/linux
parenta61638bc7a8a227755e58b40311d040fc9d41256 (diff)
[PATCH] reiserfs: reiserfs_file_write implementation
From: Oleg Drokin <green@namesys.com> With the current 'one block at a time' algorithm, writes past the end of a file are slow because each new file block is separately added into the tree causing shifting of other items which is CPU expensive. With this new implementation if you write into file with big enough chunks, it uses half as much CPU. Also this version is more SMP friendly than the current one. There are some known-bad applications that break with this patch (ie. start to work very slow or even hang). This is because the filesystem returns a large value in the stat.st_blocksize hint (128k instead of 4k). This tickles a small number of application bugs. One is KDE's kmail 3.04 (fixed by upgrading to 3.1+) and the other is sleepycat's database from before 1997. If you hit a slowdown problem that you believe is related to the increased "recommended i/o size" value, try to mount your fs with nolargeio=1 mount option (remount should work too). This patch exports block_commit_write(), generic_osync_inode() and remove_suid() to modules.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/reiserfs_fs.h4
-rw-r--r--include/linux/reiserfs_fs_sb.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index bd3f28d266c2..fa5b3bdb0de6 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1268,6 +1268,7 @@ struct path var = {ILLEGAL_PATH_ELEMENT_OFFSET, }
/* Size of pointer to the unformatted node. */
#define UNFM_P_SIZE (sizeof(unp_t))
+#define UNFM_P_SHIFT 2
// in in-core inode key is stored on le form
#define INODE_PKEY(inode) ((struct key *)(REISERFS_I(inode)->i_key))
@@ -1838,7 +1839,7 @@ void reiserfs_do_truncate (struct reiserfs_transaction_handle *th,
void padd_item (char * item, int total_length, int length);
/* inode.c */
-
+void restart_transaction(struct reiserfs_transaction_handle *th, struct inode *inode, struct path *path);
void reiserfs_read_locked_inode(struct inode * inode, struct reiserfs_iget_args *args) ;
int reiserfs_find_actor(struct inode * inode, void *p) ;
int reiserfs_init_locked_inode(struct inode * inode, void *p) ;
@@ -2111,6 +2112,7 @@ void reiserfs_discard_all_prealloc (struct reiserfs_transaction_handle *th);
#endif
void reiserfs_claim_blocks_to_be_allocated( struct super_block *sb, int blocks);
void reiserfs_release_claimed_blocks( struct super_block *sb, int blocks);
+int reiserfs_can_fit_pages(struct super_block *sb);
/* hashes.c */
__u32 keyed_hash (const signed char *msg, int len);
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
index 28b31edd08dc..25eae6a8ece8 100644
--- a/include/linux/reiserfs_fs_sb.h
+++ b/include/linux/reiserfs_fs_sb.h
@@ -397,6 +397,7 @@ struct reiserfs_sb_info
reiserfs_proc_info_data_t s_proc_info_data;
struct proc_dir_entry *procdir;
int reserved_blocks; /* amount of blocks reserved for further allocations */
+ spinlock_t bitmap_lock; /* this lock on now only used to protect reserved_blocks variable */
};
/* Definitions of reiserfs on-disk properties: */