All of lore.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] fs/reiser4/: possible cleanups
@ 2005-10-28 22:35 Adrian Bunk
  2005-10-29  3:58 ` Ioan Ionita
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2005-10-28 22:35 UTC (permalink / raw)
  To: reiserfs-list; +Cc: linux-kernel

This patch contains the following possible cleanups:
- make needlessly global code static
- #if unused code away


Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 fs/reiser4/flush_queue.c               |    2 ++
 fs/reiser4/fsdata.c                    |    9 ++++++---
 fs/reiser4/fsdata.h                    |    3 ---
 fs/reiser4/init_super.c                |    4 +++-
 fs/reiser4/inode.c                     |    2 ++
 fs/reiser4/jnode.c                     |    2 ++
 fs/reiser4/key.c                       |    2 ++
 fs/reiser4/key.h                       |    1 -
 fs/reiser4/lock.c                      |    3 +++
 fs/reiser4/oid.c                       |    2 ++
 fs/reiser4/plugin/file/cryptcompress.c |    4 ++++
 fs/reiser4/plugin/file/file.h          |    3 ---
 fs/reiser4/plugin/plugin.c             |   12 ++++++------
 fs/reiser4/plugin/plugin.h             |    2 --
 fs/reiser4/readahead.c                 |    3 +++
 fs/reiser4/readahead.h                 |    1 -
 fs/reiser4/super.c                     |    2 ++
 fs/reiser4/super.h                     |    4 ----
 fs/reiser4/tree.c                      |    2 +-
 fs/reiser4/tree.h                      |    2 --
 fs/reiser4/tree_walk.c                 |    4 ++++
 fs/reiser4/tree_walk.h                 |    2 --
 fs/reiser4/znode.c                     |    2 ++
 fs/reiser4/znode.h                     |    4 ----
 24 files changed, 44 insertions(+), 33 deletions(-)

--- linux-2.6.14-rc5-mm1/fs/reiser4/flush_queue.c.old	2005-10-28 22:51:31.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/flush_queue.c	2005-10-28 22:57:29.000000000 +0200
@@ -644,6 +644,7 @@
 	INIT_LIST_HEAD(&atom->flush_queues);
 }
 
+#ifdef REISER4_USE_EFLUSH
 /* get a flush queue for an atom pointed by given jnode (spin-locked) ; returns
  * both atom and jnode locked and found and took exclusive access for flush
  * queue object.  */
@@ -707,6 +708,7 @@
 
 	return 0;
 }
+#endif  /*  REISER4_USE_EFLUSH  */
 
 #if REISER4_DEBUG
 
--- linux-2.6.14-rc5-mm1/fs/reiser4/fsdata.h.old	2005-10-28 22:52:19.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/fsdata.h	2005-10-28 22:54:19.000000000 +0200
@@ -135,8 +135,6 @@
 extern void done_file_fsdata(void);
 extern reiser4_file_fsdata *reiser4_get_file_fsdata(struct file *);
 extern void reiser4_free_file_fsdata(struct file *);
-extern reiser4_file_fsdata *create_fsdata(struct file *);
-extern void free_fsdata(reiser4_file_fsdata *);
 
 
 /*
@@ -182,7 +180,6 @@
 extern int init_super_d_info(struct super_block *);
 extern void done_super_d_info(struct super_block *);
 
-extern int file_is_stateless(struct file *);
 extern loff_t get_dir_fpos(struct file *);
 extern int try_to_attach_fsdata(struct file *, struct inode *);
 extern void detach_fsdata(struct file *);
--- linux-2.6.14-rc5-mm1/fs/reiser4/fsdata.c.old	2005-10-28 22:52:34.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/fsdata.c	2005-10-28 22:54:41.000000000 +0200
@@ -18,6 +18,9 @@
 /* spinlock protecting manipulations with dir_cursor's hash table and lists */
 static spinlock_t d_lock = SPIN_LOCK_UNLOCKED;
 
+static reiser4_file_fsdata *create_fsdata(struct file *file);
+static int file_is_stateless(struct file *file);
+static void free_fsdata(reiser4_file_fsdata *fsdata);
 static void kill_cursor(dir_cursor *);
 
 /**
@@ -480,7 +483,7 @@
  * one file system operation. This means that there may be "detached state"
  * for underlying inode.
  */
-int file_is_stateless(struct file *file)
+static int file_is_stateless(struct file *file)
 {
 	return reiser4_get_dentry_fsdata(file->f_dentry)->stateless;
 }
@@ -686,7 +689,7 @@
  *
  * Allocates and initializes reiser4_file_fsdata structure.
  */
-reiser4_file_fsdata *create_fsdata(struct file *file)
+static reiser4_file_fsdata *create_fsdata(struct file *file)
 {
 	reiser4_file_fsdata *fsdata;
 
@@ -706,7 +709,7 @@
  *
  * Dual to create_fsdata(). Free reiser4_file_fsdata.
  */
-void free_fsdata(reiser4_file_fsdata *fsdata)
+static void free_fsdata(reiser4_file_fsdata *fsdata)
 {
 	BUG_ON(fsdata == NULL);
 	kmem_cache_free(file_fsdata_cache, fsdata);
--- linux-2.6.14-rc5-mm1/fs/reiser4/super.h.old	2005-10-28 22:54:56.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/super.h	2005-10-28 23:08:58.000000000 +0200
@@ -428,7 +428,6 @@
 extern __u64 reiser4_free_blocks(const struct super_block *super);
 extern void reiser4_set_free_blocks(const struct super_block *super, __u64 nr);
 extern __u32 reiser4_mkfs_id(const struct super_block *super);
-extern void reiser4_set_mkfs_id(const struct super_block *super, __u32 id);
 
 extern __u64 reiser4_free_committed_blocks(const struct super_block *super);
 
@@ -455,7 +454,6 @@
 				       const reiser4_block_nr * blk);
 extern int reiser4_fill_super(struct super_block *s, void *data, int silent);
 extern int reiser4_done_super(struct super_block *s);
-extern reiser4_plugin * get_default_plugin(pset_member memb);
 
 /* step of fill super */
 extern int init_fs_info(struct super_block *);
@@ -463,7 +461,6 @@
 extern int init_super_data(struct super_block *, char *opt_string);
 extern int init_read_super(struct super_block *, int silent);
 extern int init_root_inode(struct super_block *);
-extern void done_root_inode(struct super_block *);
 
 
 /* Maximal possible object id. */
@@ -477,7 +474,6 @@
 void oid_count_allocated(void);
 void oid_count_released(void);
 long oids_used(const struct super_block *);
-long oids_free(const struct super_block *);
 
 #if REISER4_DEBUG
 void print_fs_info(const char *prefix, const struct super_block *);
--- linux-2.6.14-rc5-mm1/fs/reiser4/init_super.c.old	2005-10-28 22:55:10.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/init_super.c	2005-10-28 22:55:48.000000000 +0200
@@ -665,7 +665,7 @@
 };
 
 /* access to default plugin table */
-reiser4_plugin *get_default_plugin(pset_member memb)
+static reiser4_plugin *get_default_plugin(pset_member memb)
 {
 	return plugin_by_id(default_plugins[memb].type,
 			    default_plugins[memb].id);
@@ -732,6 +732,7 @@
  *
  * Puts inode of root directory.
  */
+#if 0
 void done_root_inode(struct super_block *super)
 {
 	/* remove unused children of the parent dentry */
@@ -742,6 +743,7 @@
 	/* discard all inodes of filesystem */
 	invalidate_inodes(super);
 }
+#endif  /*  0  */
 
 /*
  * Local variables:
--- linux-2.6.14-rc5-mm1/fs/reiser4/inode.c.old	2005-10-28 22:56:35.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/inode.c	2005-10-28 22:57:08.000000000 +0200
@@ -109,6 +109,7 @@
 		return 255;
 }
 
+#ifdef REISER4_USE_COLLISION_LIMIT
 /* Maximal number of hash collisions for this directory. */
 int max_hash_collisions(const struct inode *dir /* inode queried */ )
 {
@@ -120,6 +121,7 @@
 	return ~0;
 #endif
 }
+#endif  /*  REISER4_USE_COLLISION_LIMIT  */
 
 /* Install file, inode, and address_space operation on @inode, depending on
    its mode. */
--- linux-2.6.14-rc5-mm1/fs/reiser4/jnode.c.old	2005-10-28 22:58:21.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/jnode.c	2005-10-28 22:58:38.000000000 +0200
@@ -1927,6 +1927,7 @@
 
 #endif				/* REISER4_DEBUG */
 
+#ifdef REISER4_COPY_ON_CAPTURE
 /* this is only used to created jnode during capture copy */
 jnode *jclone(jnode * node)
 {
@@ -1942,6 +1943,7 @@
 	JF_SET(clone, JNODE_CC);
 	return clone;
 }
+#endif  /*  REISER4_COPY_ON_CAPTURE  */
 
 /* Make Linus happy.
    Local variables:
--- linux-2.6.14-rc5-mm1/fs/reiser4/key.h.old	2005-10-28 22:59:04.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/key.h	2005-10-28 22:59:13.000000000 +0200
@@ -364,7 +364,6 @@
 /* size of a buffer suitable to hold human readable key representation */
 #define KEY_BUF_LEN (80)
 
-extern int sprintf_key(char *buffer, const reiser4_key * key);
 #if REISER4_DEBUG
 extern void print_key(const char *prefix, const reiser4_key * key);
 #else
--- linux-2.6.14-rc5-mm1/fs/reiser4/key.c.old	2005-10-28 22:59:20.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/key.c	2005-10-28 22:59:34.000000000 +0200
@@ -126,6 +126,7 @@
 
 #endif
 
+#if 0
 /* like print_key() but outputs key representation into @buffer. */
 int sprintf_key(char *buffer /* buffer to print key into */ ,
 		const reiser4_key * key /* key to print */ )
@@ -146,6 +147,7 @@
 			       (unsigned long long)get_key_objectid(key),
 			       (unsigned long long)get_key_offset(key));
 }
+#endif  /*  0  */
 
 /* Make Linus happy.
    Local variables:
--- linux-2.6.14-rc5-mm1/fs/reiser4/znode.h.old	2005-10-28 22:59:56.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/znode.h	2005-10-28 23:13:08.000000000 +0200
@@ -238,12 +238,8 @@
 
 #if REISER4_DEBUG
 extern void print_znode(const char *prefix, const znode * node);
-extern void print_znodes(const char *prefix, reiser4_tree * tree);
-extern void print_lock_stack(const char *prefix, lock_stack * owner);
 #else
 #define print_znode( p, n ) noop
-#define print_znodes( p, t ) noop
-#define print_lock_stack( p, o ) noop
 #endif
 
 /* Make it look like various znode functions exist instead of treating znodes as
--- linux-2.6.14-rc5-mm1/fs/reiser4/lock.c.old	2005-10-28 23:00:10.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/lock.c	2005-10-28 23:00:26.000000000 +0200
@@ -1259,6 +1259,8 @@
 }
 
 #if REISER4_DEBUG
+
+#if 0
 /* Debugging help */
 void print_lock_stack(const char *prefix, lock_stack * owner)
 {
@@ -1288,6 +1290,7 @@
 
 	spin_unlock_stack(owner);
 }
+#endif  /*  0  */
 
 /*
  * debugging functions
--- linux-2.6.14-rc5-mm1/fs/reiser4/oid.c.old	2005-10-28 23:01:19.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/oid.c	2005-10-28 23:01:36.000000000 +0200
@@ -100,6 +100,7 @@
 		return (long)-1;
 }
 
+#if 0
 /*
  * return number of "free" oids. This is used by statfs(2) to report "free"
  * inodes.
@@ -119,6 +120,7 @@
 	else
 		return (long)-1;
 }
+#endif  /*  0  */
 
 /*
  * Count oid as allocated in atom. This is done after call to oid_allocate()
--- linux-2.6.14-rc5-mm1/fs/reiser4/plugin/file/file.h.old	2005-10-28 23:01:52.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/plugin/file/file.h	2005-10-28 23:02:36.000000000 +0200
@@ -174,9 +174,6 @@
 extern int readpage_cryptcompress(struct file *, struct page *);
 extern int writepages_cryptcompress(struct address_space *,
 				     struct writeback_control *);
-extern void readpages_cryptcompress(struct file *, struct address_space *,
-				    struct list_head *pages);
-extern sector_t bmap_cryptcompress(struct address_space *, sector_t lblock);
 
 
 /* file plugin operations */
--- linux-2.6.14-rc5-mm1/fs/reiser4/plugin/file/cryptcompress.c.old	2005-10-28 23:02:05.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/plugin/file/cryptcompress.c	2005-10-28 23:02:51.000000000 +0200
@@ -1010,6 +1010,7 @@
 	return result;
 }
 
+#if 0
 /* plugin->readpages() */
 void
 readpages_cryptcompress(struct file *file, struct address_space *mapping,
@@ -1033,6 +1034,7 @@
 
 	return;
 }
+#endif  /*  0  */
 
 /* how much pages will be captured */
 static int cluster_nrpages_to_capture(reiser4_cluster_t * clust)
@@ -3357,6 +3359,7 @@
 /* plugin->u.file.release */
 /* plugin->u.file.get_block */
 
+#if 0
 /* implentation of vfs' bmap method of struct address_space_operations for
    cryptcompress plugin
 */
@@ -3418,6 +3421,7 @@
 		return result;
 	}
 }
+#endif  /*  0  */
 
 /* this is implementation of delete method of file plugin for cryptcompress
  */
--- linux-2.6.14-rc5-mm1/fs/reiser4/plugin/plugin.h.old	2005-10-28 23:05:17.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/plugin/plugin.h	2005-10-28 23:05:23.000000000 +0200
@@ -677,8 +677,6 @@
 /* stores plugin reference in reiser4-specific part of inode */
 extern int set_object_plugin(struct inode *inode, reiser4_plugin_id id);
 extern int setup_plugins(struct super_block *super, reiser4_plugin ** area);
-extern reiser4_plugin *lookup_plugin(const char *type_label,
-				     const char *plug_label);
 extern int init_plugins(void);
 
 /* builtin plugins */
--- linux-2.6.14-rc5-mm1/fs/reiser4/plugin/plugin.c.old	2005-10-28 23:05:32.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/plugin/plugin.c	2005-10-28 23:19:52.000000000 +0200
@@ -186,14 +186,8 @@
 /* initialise plugin sub-system. Just call this once on reiser4 startup. */
 int init_plugins(void);
 int setup_plugins(struct super_block *super, reiser4_plugin ** area);
-reiser4_plugin *lookup_plugin(const char *type_label, const char *plug_label);
 int locate_plugin(struct inode *inode, plugin_locator * loc);
 
-/* internal functions. */
-
-static reiser4_plugin_type find_type(const char *label);
-static reiser4_plugin *find_plugin(reiser4_plugin_type_data * ptype,
-				   const char *label);
 
 /**
  * init_plugins - initialize plugins
@@ -257,6 +251,7 @@
 	return id < plugins[type_id].builtin_num;
 }
 
+#if 0
 /* lookup plugin by scanning tables */
 reiser4_plugin *lookup_plugin(const char *type_label /* plugin type label */ ,
 			      const char *plug_label /* plugin label */ )
@@ -274,6 +269,7 @@
 		result = NULL;
 	return result;
 }
+#endif  /*  0  */
 
 /* return plugin by its @type_id and @id.
 
@@ -329,6 +325,8 @@
 	return &plugins[type_id].plugins_list;
 }
 
+#if 0
+
 /* find plugin type by label */
 static reiser4_plugin_type find_type(const char *label	/* plugin type
 							 * label */ )
@@ -370,6 +368,8 @@
 	return NULL;
 }
 
+#endif  /*  0  */
+
 int grab_plugin(struct inode *self, struct inode *ancestor, pset_member memb)
 {
 	reiser4_plugin *plug;
--- linux-2.6.14-rc5-mm1/fs/reiser4/readahead.h.old	2005-10-28 23:07:37.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/readahead.h	2005-10-28 23:07:45.000000000 +0200
@@ -32,7 +32,6 @@
 	loff_t slow_start;	/* enlarging r/a size algorithm. */
 };
 
-extern int reiser4_file_readahead(struct file *, loff_t, size_t);
 extern void reiser4_readdir_readahead_init(struct inode *dir, tap_t * tap);
 
 /* __READAHEAD_H__ */
--- linux-2.6.14-rc5-mm1/fs/reiser4/readahead.c.old	2005-10-28 23:07:53.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/readahead.c	2005-10-28 23:20:32.000000000 +0200
@@ -112,6 +112,8 @@
 	done_lh(&next_lh);
 }
 
+#if 0
+
 static inline loff_t get_max_readahead(struct reiser4_file_ra_state *ra)
 {
 	/* NOTE: ra->max_window_size is initialized in
@@ -360,6 +362,7 @@
       out:
 	return 0;
 }
+#endif  /*  0  */
 
 void reiser4_readdir_readahead_init(struct inode *dir, tap_t * tap)
 {
--- linux-2.6.14-rc5-mm1/fs/reiser4/super.c.old	2005-10-28 23:09:05.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/super.c	2005-10-28 23:09:20.000000000 +0200
@@ -120,6 +120,7 @@
 	return get_super_private(super)->mkfs_id;
 }
 
+#if 0
 /* set mkfs unique identifier */
 void reiser4_set_mkfs_id(const struct super_block *super, __u32 id)
 {
@@ -127,6 +128,7 @@
 	assert("vpf-224", is_reiser4_super(super));
 	get_super_private(super)->mkfs_id = id;
 }
+#endif  /*  0  */
 
 /* amount of free blocks in file system */
 __u64 reiser4_free_committed_blocks(const struct super_block *super)
--- linux-2.6.14-rc5-mm1/fs/reiser4/tree.h.old	2005-10-28 23:09:35.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/tree.h	2005-10-28 23:09:44.000000000 +0200
@@ -168,8 +168,6 @@
 #define spin_ordering_pred_epoch(tree) (1)
 SPIN_LOCK_FUNCTIONS(epoch, reiser4_tree, epoch_lock);
 
-extern void init_tree_0(reiser4_tree *);
-
 extern int init_tree(reiser4_tree * tree,
 		     const reiser4_block_nr * root_block, tree_level height,
 		     node_plugin * default_plugin);
--- linux-2.6.14-rc5-mm1/fs/reiser4/tree.c.old	2005-10-28 23:09:52.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/tree.c	2005-10-28 23:10:01.000000000 +0200
@@ -1814,7 +1814,7 @@
 }
 
 /* first step of reiser4 tree initialization */
-void init_tree_0(reiser4_tree * tree)
+static void init_tree_0(reiser4_tree * tree)
 {
 	assert("zam-683", tree != NULL);
 	rw_tree_init(tree);
--- linux-2.6.14-rc5-mm1/fs/reiser4/tree_walk.h.old	2005-10-28 23:11:08.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/tree_walk.h	2005-10-28 23:11:19.000000000 +0200
@@ -105,8 +105,6 @@
 	 * node or extent processing functions. */
 	int (*before) (void *);
 };
-extern int tree_walk(const reiser4_key *, int, struct tree_walk_actor *,
-		     void *);
 
 #if REISER4_DEBUG
 int check_sibling_list(znode * node);
--- linux-2.6.14-rc5-mm1/fs/reiser4/tree_walk.c.old	2005-10-28 23:11:38.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/tree_walk.c	2005-10-28 23:12:13.000000000 +0200
@@ -910,6 +910,8 @@
 	assert("nikita-3281", check_sibling_list(before));
 }
 
+#if 0
+
 struct tw_handle {
 	/* A key for tree walking (re)start, updated after each successful tree
 	 * node processing */
@@ -1237,6 +1239,8 @@
 	return ret;
 }
 
+#endif  /*  0  */
+
 /*
    Local variables:
    c-indentation-style: "K&R"
--- linux-2.6.14-rc5-mm1/fs/reiser4/znode.c.old	2005-10-28 23:13:20.000000000 +0200
+++ linux-2.6.14-rc5-mm1/fs/reiser4/znode.c	2005-10-28 23:13:39.000000000 +0200
@@ -1031,6 +1031,7 @@
 	printk("\n");
 }
 
+#if 0
 /* print all znodes in @tree */
 void print_znodes(const char *prefix, reiser4_tree * tree)
 {
@@ -1061,6 +1062,7 @@
 	if (tree_lock_taken)
 		WUNLOCK_TREE(tree);
 }
+#endif  /*  0  */
 
 /* return non-0 iff data are loaded into znode */
 int znode_is_loaded(const znode * node /* znode to query */ )

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [2.6 patch] fs/reiser4/: possible cleanups
  2005-10-28 22:35 [2.6 patch] fs/reiser4/: possible cleanups Adrian Bunk
@ 2005-10-29  3:58 ` Ioan Ionita
  2005-10-29  9:22   ` Adrian Bunk
  0 siblings, 1 reply; 6+ messages in thread
From: Ioan Ionita @ 2005-10-29  3:58 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel, reiserfs-list

[-- Attachment #1: Type: text/plain, Size: 353 bytes --]

When I read the Subject (*[2.6 patch] fs/reiser4/: possible cleanups)* for a
second, I thought that this patch was against Linus' tree. I concluded that
reiser4 must have been recently merged in mainline, since there's a patch
for it. But no, it's a -mm patch. Gah! Shouldn't the Subject be more like [
2.6-mm patch] as to not mislead us dreamers?

[-- Attachment #2: Type: text/html, Size: 447 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [2.6 patch] fs/reiser4/: possible cleanups
  2005-10-29  3:58 ` Ioan Ionita
@ 2005-10-29  9:22   ` Adrian Bunk
  2005-10-29  9:58     ` PFC
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2005-10-29  9:22 UTC (permalink / raw)
  To: Ioan Ionita; +Cc: linux-kernel, reiserfs-list

On Fri, Oct 28, 2005 at 11:58:40PM -0400, Ioan Ionita wrote:

> When I read the Subject (*[2.6 patch] fs/reiser4/: possible cleanups)* for a
> second, I thought that this patch was against Linus' tree. I concluded that
> reiser4 must have been recently merged in mainline, since there's a patch
> for it. But no, it's a -mm patch. Gah! Shouldn't the Subject be more like [
> 2.6-mm patch] as to not mislead us dreamers?

It should have been [-mm patch], but everyone makes mistakes...

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [2.6 patch] fs/reiser4/: possible cleanups
  2005-10-29  9:22   ` Adrian Bunk
@ 2005-10-29  9:58     ` PFC
  2005-10-29 16:09       ` Hans Reiser
  0 siblings, 1 reply; 6+ messages in thread
From: PFC @ 2005-10-29  9:58 UTC (permalink / raw)
  To: reiserfs-list


	Remember my message where I said reiser4 was preventing my laptop from  
shutting down itself ?

	Well it turned out that, in fact, it was a stupid shfs-mount process  
which would refuse to die. Adding a "killall ssh" in the local.stop script  
is a bit violent, but perfectly functional way, to bring it back to  
reason. Everything now works.

	But still, I had to fsck --rebuild-tree just because my battery ran out...


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [2.6 patch] fs/reiser4/: possible cleanups
  2005-10-29  9:58     ` PFC
@ 2005-10-29 16:09       ` Hans Reiser
  2005-10-29 22:21         ` fsck --rebuild-tree just because my battery ran out PFC
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Reiser @ 2005-10-29 16:09 UTC (permalink / raw)
  To: PFC, Alexander Zarochentcev; +Cc: reiserfs-list

PFC wrote:

>
>     Remember my message where I said reiser4 was preventing my laptop
> from  shutting down itself ?
>
>     Well it turned out that, in fact, it was a stupid shfs-mount
> process  which would refuse to die. Adding a "killall ssh" in the
> local.stop script  is a bit violent, but perfectly functional way, to
> bring it back to  reason. Everything now works.
>
>     But still, I had to fsck --rebuild-tree just because my battery
> ran out...
>
>
>
the battery running out should not have caused you to need to do that.

zam, can you do some testing of how well we handle power cord yanking
while under load?  There are some guys at stanford who have some test
programs for this sort of thing, I wish I could remember their name at
the moment....

Hans

^ permalink raw reply	[flat|nested] 6+ messages in thread

* fsck --rebuild-tree just because my battery ran out...
  2005-10-29 16:09       ` Hans Reiser
@ 2005-10-29 22:21         ` PFC
  0 siblings, 0 replies; 6+ messages in thread
From: PFC @ 2005-10-29 22:21 UTC (permalink / raw)
  To: Hans Reiser, Alexander Zarochentcev; +Cc: reiserfs-list


	I do not know if a laptop battery running out behaves the same as a power  
cord yanking, but this fact may be interesting :
	As I was just reading some document, with no other activity, the  
harddrive had spinned down since a while, and was NOT running (as in NOT  
spinning) when the battery ran out. So it seems, the HD had spinned down,  
while the FS was in an inconsistent state. Strange.

	This happened several times, out of which, once I had to fsck, and the  
other to --rebuild-tree.

	linux-2.6.11-cko1-swsusp2
	reiser4
	gentoo
	Centrino Pentium M laptop

cat /proc/sys/vm/laptop_mode
0

/dev/hda:
  multcount    = 16 (on)
  IO_support   =  0 (default 16-bit)
  unmaskirq    =  0 (off)
  using_dma    =  1 (on)
  keepsettings =  0 (off)
  readonly     =  0 (off)
  readahead    = 256 (on)
  geometry     = 65535/16/63, sectors = 60011642880, start = 0

I assume the disk flushes its write cache before going to standby (or else  
the manufacturers are crazy)...

	I hope this can help...

>>     Remember my message where I said reiser4 was preventing my laptop
>> from  shutting down itself ?
>>
>>     Well it turned out that, in fact, it was a stupid shfs-mount
>> process  which would refuse to die. Adding a "killall ssh" in the
>> local.stop script  is a bit violent, but perfectly functional way, to
>> bring it back to  reason. Everything now works.
>>
>>     But still, I had to fsck --rebuild-tree just because my battery
>> ran out...
>>
>>
>>
> the battery running out should not have caused you to need to do that.
>
> zam, can you do some testing of how well we handle power cord yanking
> while under load?  There are some guys at stanford who have some test
> programs for this sort of thing, I wish I could remember their name at
> the moment....http://www.materiel.net/details_VA7000BWA.html
>
> Hans
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-10-29 22:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-28 22:35 [2.6 patch] fs/reiser4/: possible cleanups Adrian Bunk
2005-10-29  3:58 ` Ioan Ionita
2005-10-29  9:22   ` Adrian Bunk
2005-10-29  9:58     ` PFC
2005-10-29 16:09       ` Hans Reiser
2005-10-29 22:21         ` fsck --rebuild-tree just because my battery ran out PFC

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.