All of lore.kernel.org
 help / color / mirror / Atom feed
* Reiser4 for 2.6.19
@ 2006-12-03 13:49 Laurent Riffard
  2006-12-03 13:49 ` [PATCH 1/10] Reiser4 for 2.6.18 version 3 Laurent Riffard
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Laurent Riffard @ 2006-12-03 13:49 UTC (permalink / raw)
  To: reiserfs-list@namesys.com

[this is a repost, since half of my previous mails didn't reach 
 reiserfs mailing-list]

Hi,

There is 10 patches in this series, first one is "Reiser4 for 2.6.18
version 3". It's made up from the last Namesys Reiser4 patch for vanilla
kernel
(http://ftp.namesys.com/pub/reiser4-for-2.6/2.6.18/reiser4-for-2.6.18-3.patch.gz),
updated to apply cleanly on top of 2.6.19 kernel. One can alternatively
apply the original patch from Namesys (reiser4-for-2.6.18-3.patch.gz) on
top of 2.6.19 kernel, it will successfully apply with some oddities.

The 9 next patches are compile-fixes for 2.6.19 or bug-fixes I picked up from
reiserfs mailing-list.

Andrew Wade (3):
    Reiser4: fix use after free in jrelse_tail
    Reiser4: release d_ref
    Reiser4: release d_ref (fix)

Edward Shishkin (2):
    Reiser4 for 2.6.18 version 3
    reiser4-generic_file_read-fix

Laurent Riffard (5):
    Reiser4: cometics changes in mm/filemap.c.
    Reiser4: fix calls to kmem_cache_destroy
    Reiser4: Replace inode.u.generic_ip with inode.i_private
    Reiser4: inode.i_blksize suppression
    Reiser4: remove unnecessary config.h includes.

The whole series is available as in a single patch:
http://laurent.riffard.free.fr/reiser4/reiser4-for-2.6.19.patch.gz.

I'm not a filesystem guru, nor I'm affiliated with Namesys. These
patches just suit my needs. It works for me and I hope it will help
somebody else. 

~~
laurent 






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

* [PATCH 1/10] Reiser4 for 2.6.18 version 3
  2006-12-03 13:49 Reiser4 for 2.6.19 Laurent Riffard
@ 2006-12-03 13:49 ` Laurent Riffard
  2006-12-03 13:50 ` [PATCH 2/10] Reiser4: cometics changes in mm/filemap.c Laurent Riffard
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Laurent Riffard @ 2006-12-03 13:49 UTC (permalink / raw)
  To: reiserfs-list@namesys.com


This is the last reiser4 patch for vanilla kernel from namesys.com 
(http://ftp.namesys.com/pub/reiser4-for-2.6/2.6.18/reiser4-for-2.6.18-3.patch.gz).

---
Documentation/Changes                         |   12 +
Documentation/filesystems/reiser4.txt         |   75 +
arch/i386/lib/usercopy.c                      |    2 +
fs/Kconfig                                    |    2 +
fs/Makefile                                   |    1 +
fs/fs-writeback.c                             |   26 +-
fs/reiser4/Kconfig                            |   31 +
fs/reiser4/Makefile                           |  100 +
fs/reiser4/README                             |  125 +
fs/reiser4/as_ops.c                           |  391 +++
fs/reiser4/block_alloc.c                      | 1139 ++++++++
fs/reiser4/block_alloc.h                      |  175 ++
fs/reiser4/blocknrset.c                       |  368 +++
fs/reiser4/carry.c                            | 1381 +++++++++
fs/reiser4/carry.h                            |  442 +++
fs/reiser4/carry_ops.c                        | 2103 ++++++++++++++
fs/reiser4/carry_ops.h                        |   42 +
fs/reiser4/context.c                          |  278 ++
fs/reiser4/context.h                          |  228 ++
fs/reiser4/coord.c                            |  937 ++++++
fs/reiser4/coord.h                            |  389 +++
fs/reiser4/debug.c                            |  300 ++
fs/reiser4/debug.h                            |  350 +++
fs/reiser4/dformat.h                          |   71 +
fs/reiser4/dscale.c                           |  174 ++
fs/reiser4/dscale.h                           |   27 +
fs/reiser4/entd.c                             |  354 +++
fs/reiser4/entd.h                             |   90 +
fs/reiser4/eottl.c                            |  510 ++++
fs/reiser4/estimate.c                         |  111 +
fs/reiser4/export_ops.c                       |  296 ++
fs/reiser4/flush.c                            | 3626 +++++++++++++++++++++++
fs/reiser4/flush.h                            |  274 ++
fs/reiser4/flush_queue.c                      |  681 +++++
fs/reiser4/forward.h                          |  258 ++
fs/reiser4/fsdata.c                           |  803 ++++++
fs/reiser4/fsdata.h                           |  218 ++
fs/reiser4/init_super.c                       |  739 +++++
fs/reiser4/inode.c                            |  727 +++++
fs/reiser4/inode.h                            |  430 +++
fs/reiser4/ioctl.h                            |   41 +
fs/reiser4/jnode.c                            | 1922 +++++++++++++
fs/reiser4/jnode.h                            |  707 +++++
fs/reiser4/kassign.c                          |  659 +++++
fs/reiser4/kassign.h                          |  110 +
fs/reiser4/key.c                              |  137 +
fs/reiser4/key.h                              |  384 +++
fs/reiser4/ktxnmgrd.c                         |  214 ++
fs/reiser4/ktxnmgrd.h                         |   52 +
fs/reiser4/lock.c                             | 1261 ++++++++
fs/reiser4/lock.h                             |  272 ++
fs/reiser4/oid.c                              |  141 +
fs/reiser4/page_cache.c                       |  712 +++++
fs/reiser4/page_cache.h                       |   62 +
fs/reiser4/plugin/Makefile                    |   26 +
fs/reiser4/plugin/cluster.c                   |   66 +
fs/reiser4/plugin/cluster.h                   |  315 ++
fs/reiser4/plugin/compress/Makefile           |    6 +
fs/reiser4/plugin/compress/compress.c         |  370 +++
fs/reiser4/plugin/compress/compress.h         |   38 +
fs/reiser4/plugin/compress/compress_mode.c    |  163 ++
fs/reiser4/plugin/compress/lzoconf.h          |  420 +++
fs/reiser4/plugin/compress/minilzo.c          | 2155 ++++++++++++++
fs/reiser4/plugin/compress/minilzo.h          |   94 +
fs/reiser4/plugin/crypto/cipher.c             |  116 +
fs/reiser4/plugin/crypto/cipher.h             |   67 +
fs/reiser4/plugin/crypto/digest.c             |   58 +
fs/reiser4/plugin/dir/Makefile                |    5 +
fs/reiser4/plugin/dir/dir.h                   |   36 +
fs/reiser4/plugin/dir/hashed_dir.c            |   81 +
fs/reiser4/plugin/dir/seekable_dir.c          |   46 +
fs/reiser4/plugin/dir_plugin_common.c         |  864 ++++++
fs/reiser4/plugin/disk_format/Makefile        |    5 +
fs/reiser4/plugin/disk_format/disk_format.c   |   37 +
fs/reiser4/plugin/disk_format/disk_format.h   |   27 +
fs/reiser4/plugin/disk_format/disk_format40.c |  556 ++++
fs/reiser4/plugin/disk_format/disk_format40.h |   99 +
fs/reiser4/plugin/fibration.c                 |  174 ++
fs/reiser4/plugin/fibration.h                 |   37 +
fs/reiser4/plugin/file/Makefile               |    7 +
fs/reiser4/plugin/file/cryptcompress.c        | 3819 +++++++++++++++++++++++++
fs/reiser4/plugin/file/cryptcompress.h        |  549 ++++
fs/reiser4/plugin/file/file.c                 | 2713 ++++++++++++++++++
fs/reiser4/plugin/file/file.h                 |  257 ++
fs/reiser4/plugin/file/invert.c               |  493 ++++
fs/reiser4/plugin/file/symfile.c              |   87 +
fs/reiser4/plugin/file/symlink.c              |   92 +
fs/reiser4/plugin/file/tail_conversion.c      |  728 +++++
fs/reiser4/plugin/file_ops.c                  |  167 ++
fs/reiser4/plugin/file_ops_readdir.c          |  655 +++++
fs/reiser4/plugin/file_plugin_common.c        |  929 ++++++
fs/reiser4/plugin/hash.c                      |  350 +++
fs/reiser4/plugin/inode_ops.c                 |  886 ++++++
fs/reiser4/plugin/inode_ops_rename.c          |  904 ++++++
fs/reiser4/plugin/item/Makefile               |   18 +
fs/reiser4/plugin/item/acl.h                  |   66 +
fs/reiser4/plugin/item/blackbox.c             |  142 +
fs/reiser4/plugin/item/blackbox.h             |   33 +
fs/reiser4/plugin/item/cde.c                  | 1007 +++++++
fs/reiser4/plugin/item/cde.h                  |   87 +
fs/reiser4/plugin/item/ctail.c                | 1588 ++++++++++
fs/reiser4/plugin/item/ctail.h                |   89 +
fs/reiser4/plugin/item/extent.c               |  197 ++
fs/reiser4/plugin/item/extent.h               |  228 ++
fs/reiser4/plugin/item/extent_file_ops.c      | 1710 +++++++++++
fs/reiser4/plugin/item/extent_flush_ops.c     | 1018 +++++++
fs/reiser4/plugin/item/extent_item_ops.c      |  882 ++++++
fs/reiser4/plugin/item/internal.c             |  392 +++
fs/reiser4/plugin/item/internal.h             |   57 +
fs/reiser4/plugin/item/item.c                 |  727 +++++
fs/reiser4/plugin/item/item.h                 |  399 +++
fs/reiser4/plugin/item/sde.c                  |  190 ++
fs/reiser4/plugin/item/sde.h                  |   66 +
fs/reiser4/plugin/item/static_stat.c          | 1040 +++++++
fs/reiser4/plugin/item/static_stat.h          |  219 ++
fs/reiser4/plugin/item/tail.c                 |  805 ++++++
fs/reiser4/plugin/item/tail.h                 |   58 +
fs/reiser4/plugin/node/Makefile               |    5 +
fs/reiser4/plugin/node/node.c                 |  131 +
fs/reiser4/plugin/node/node.h                 |  272 ++
fs/reiser4/plugin/node/node40.c               | 2924 +++++++++++++++++++
fs/reiser4/plugin/node/node40.h               |  125 +
fs/reiser4/plugin/object.c                    |  501 ++++
fs/reiser4/plugin/object.h                    |  121 +
fs/reiser4/plugin/plugin.c                    |  535 ++++
fs/reiser4/plugin/plugin.h                    |  935 ++++++
fs/reiser4/plugin/plugin_header.h             |  136 +
fs/reiser4/plugin/plugin_set.c                |  378 +++
fs/reiser4/plugin/plugin_set.h                |   82 +
fs/reiser4/plugin/regular.c                   |   44 +
fs/reiser4/plugin/security/Makefile           |    4 +
fs/reiser4/plugin/security/perm.c             |   44 +
fs/reiser4/plugin/security/perm.h             |   82 +
fs/reiser4/plugin/space/Makefile              |    4 +
fs/reiser4/plugin/space/bitmap.c              | 1592 +++++++++++
fs/reiser4/plugin/space/bitmap.h              |   47 +
fs/reiser4/plugin/space/space_allocator.h     |   80 +
fs/reiser4/plugin/tail_policy.c               |  113 +
fs/reiser4/pool.c                             |  236 ++
fs/reiser4/pool.h                             |   54 +
fs/reiser4/readahead.c                        |  138 +
fs/reiser4/readahead.h                        |   48 +
fs/reiser4/reiser4.h                          |  276 ++
fs/reiser4/safe_link.c                        |  351 +++
fs/reiser4/safe_link.h                        |   29 +
fs/reiser4/seal.c                             |  217 ++
fs/reiser4/seal.h                             |   49 +
fs/reiser4/search.c                           | 1611 +++++++++++
fs/reiser4/status_flags.c                     |  176 ++
fs/reiser4/status_flags.h                     |   43 +
fs/reiser4/super.c                            |  313 ++
fs/reiser4/super.h                            |  467 +++
fs/reiser4/super_ops.c                        |  724 +++++
fs/reiser4/tap.c                              |  377 +++
fs/reiser4/tap.h                              |   69 +
fs/reiser4/tree.c                             | 1875 ++++++++++++
fs/reiser4/tree.h                             |  579 ++++
fs/reiser4/tree_mod.c                         |  383 +++
fs/reiser4/tree_mod.h                         |   29 +
fs/reiser4/tree_walk.c                        |  926 ++++++
fs/reiser4/tree_walk.h                        |  125 +
fs/reiser4/txnmgr.c                           | 3158 ++++++++++++++++++++
fs/reiser4/txnmgr.h                           |  703 +++++
fs/reiser4/type_safe_hash.h                   |  320 +++
fs/reiser4/vfs_ops.c                          |  267 ++
fs/reiser4/vfs_ops.h                          |   58 +
fs/reiser4/wander.c                           | 1799 ++++++++++++
fs/reiser4/wander.h                           |  135 +
fs/reiser4/writeout.h                         |   21 +
fs/reiser4/znode.c                            | 1028 +++++++
fs/reiser4/znode.h                            |  434 +++
include/linux/fs.h                            |    3 +
lib/radix-tree.c                              |    1 +
mm/filemap.c                                  |    5 +
mm/readahead.c                                |    1 +
175 files changed, 79648 insertions(+), 10 deletions(-)


Since this patch is really big, it is available from 
http://laurent.riffard.free.fr/reiser4/reiser4-for-2.6.18-3-for-2.6.19.patch.gz
[597 kiB].

-- 1.4.4.1.gaed4 


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

* [PATCH 2/10] Reiser4: cometics changes in mm/filemap.c.
  2006-12-03 13:49 Reiser4 for 2.6.19 Laurent Riffard
  2006-12-03 13:49 ` [PATCH 1/10] Reiser4 for 2.6.18 version 3 Laurent Riffard
@ 2006-12-03 13:50 ` Laurent Riffard
  2006-12-03 13:50 ` [PATCH 3/10] Reiser4: fix use after free in jrelse_tail Laurent Riffard
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Laurent Riffard @ 2006-12-03 13:50 UTC (permalink / raw)
  To: reiserfs-list@namesys.com

This patch moves some EXPORT_SYMOLs near the functions definition.
---
mm/filemap.c |    6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/filemap.c b/mm/filemap.c
index ffe6dcc..c117b52 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -467,6 +467,7 @@ int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
		lru_cache_add(page);
	return ret;
}
+EXPORT_SYMBOL(add_to_page_cache_lru);

#ifdef CONFIG_NUMA
struct page *__page_cache_alloc(gfp_t gfp)
@@ -740,7 +741,7 @@ unsigned find_get_pages(struct address_space *mapping, pgoff_t start,
	read_unlock_irq(&mapping->tree_lock);
	return ret;
}
-EXPORT_SYMBOL(add_to_page_cache_lru);
+EXPORT_SYMBOL(find_get_pages);

/**
 * find_get_pages_contig - gang contiguous pagecache lookup
@@ -801,7 +802,7 @@ unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index,
	read_unlock_irq(&mapping->tree_lock);
	return ret;
}
-EXPORT_SYMBOL(find_get_pages);
+EXPORT_SYMBOL(find_get_pages_tag);

/**
 * grab_cache_page_nowait - returns locked page at given index in given cache
@@ -859,7 +860,6 @@ static void shrink_readahead_size_eio(struct file *filp,

	ra->ra_pages /= 4;
}
-EXPORT_SYMBOL(find_get_pages_tag);

/**
 * do_generic_mapping_read - generic file read routine
-- 1.4.4.1.gaed4 


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

* [PATCH 3/10] Reiser4: fix use after free in jrelse_tail
  2006-12-03 13:49 Reiser4 for 2.6.19 Laurent Riffard
  2006-12-03 13:49 ` [PATCH 1/10] Reiser4 for 2.6.18 version 3 Laurent Riffard
  2006-12-03 13:50 ` [PATCH 2/10] Reiser4: cometics changes in mm/filemap.c Laurent Riffard
@ 2006-12-03 13:50 ` Laurent Riffard
  2006-12-03 13:50 ` [PATCH 4/10] Reiser4: release d_ref Laurent Riffard
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Laurent Riffard @ 2006-12-03 13:50 UTC (permalink / raw)
  To: reiserfs-list@namesys.com

(From Andrew Wade <andrew.j.wade@gmail.com>)

"[nikita-1936] assertion failed: reiser4_no_counters_are_held()" turned
out to be a bug in the debugging code. I've applied the patch below and
haven't had a recurrence.
---
fs/reiser4/jnode.c |    4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/reiser4/jnode.c b/fs/reiser4/jnode.c
index e814712..8e4c026 100644
--- a/fs/reiser4/jnode.c
+++ b/fs/reiser4/jnode.c
@@ -999,10 +999,10 @@ void jrelse_tail(jnode * node /* jnode to release references to */ )
{
	assert("nikita-489", atomic_read(&node->d_count) > 0);
	atomic_dec(&node->d_count);
-	/* release reference acquired in jload_gfp() or jinit_new() */
-	jput(node);
	if (jnode_is_unformatted(node) || jnode_is_znode(node))
		LOCK_CNT_DEC(d_refs);
+	/* release reference acquired in jload_gfp() or jinit_new() */
+	jput(node);
}

/* drop reference to node data. When last reference is dropped, data are
-- 1.4.4.1.gaed4 






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

* [PATCH 4/10] Reiser4: release d_ref
  2006-12-03 13:49 Reiser4 for 2.6.19 Laurent Riffard
                   ` (2 preceding siblings ...)
  2006-12-03 13:50 ` [PATCH 3/10] Reiser4: fix use after free in jrelse_tail Laurent Riffard
@ 2006-12-03 13:50 ` Laurent Riffard
  2006-12-03 13:50 ` [PATCH 5/10] Reiser4: release d_ref (fix) Laurent Riffard
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Laurent Riffard @ 2006-12-03 13:50 UTC (permalink / raw)
  To: reiserfs-list@namesys.com

(From Andrew Wade <andrew.j.wade@gmail.com>)

Hello Alexander,

In addition to your patch, I've also applied the patch below. With
these two patches the fs is much more stable for me.

However, something is holding a d_ref across the calls to
reiser4_writepage. It's not clear to me that this is allowed so my
patch may not be a full fix.

Andrew Wade
---
fs/reiser4/plugin/item/extent_file_ops.c |   12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/fs/reiser4/plugin/item/extent_file_ops.c b/fs/reiser4/plugin/item/extent_file_ops.c
index af4c89e..7afbca3 100644
--- a/fs/reiser4/plugin/item/extent_file_ops.c
+++ b/fs/reiser4/plugin/item/extent_file_ops.c
@@ -1313,20 +1313,22 @@ static int extent_readpage_filler(void *data, struct page *page)
				      TWIG_LEVEL, CBK_UNIQUE, NULL);
		if (result != CBK_COORD_FOUND) {
			unset_hint(hint);
-			return result;
+			goto out;
		}
		ext_coord->valid = 0;
	}

	if (zload(ext_coord->coord.node)) {
		unset_hint(hint);
-		return RETERR(-EIO);
+		result = RETERR(-EIO);
+		goto out;
	}
	if (!item_is_extent(&ext_coord->coord)) {
		/* tail conversion is running in parallel */
		zrelse(ext_coord->coord.node);
		unset_hint(hint);
-		return RETERR(-EIO);
+		result = RETERR(-EIO);
+		goto out;
	}

	if (ext_coord->valid == 0)
@@ -1351,6 +1353,10 @@ static int extent_readpage_filler(void *data, struct page *page)
	} else
		unset_hint(hint);
	zrelse(ext_coord->coord.node);
+
+out:
+	/* Calls to this function may be intermingled with VM writeback. */
+	reiser4_txn_restart_current();
	return result;
}

-- 1.4.4.1.gaed4 






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

* [PATCH 5/10] Reiser4: release d_ref (fix)
  2006-12-03 13:49 Reiser4 for 2.6.19 Laurent Riffard
                   ` (3 preceding siblings ...)
  2006-12-03 13:50 ` [PATCH 4/10] Reiser4: release d_ref Laurent Riffard
@ 2006-12-03 13:50 ` Laurent Riffard
  2006-12-03 13:50 ` [PATCH 6/10] Reiser4: fix calls to kmem_cache_destroy Laurent Riffard
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Laurent Riffard @ 2006-12-03 13:50 UTC (permalink / raw)
  To: reiserfs-list@namesys.com

(From Andrew Wade <andrew.j.wade@gmail.com>)

Fix erronous call to reiser4_txn_restart_current, should
be txn_restart_current.
---
fs/reiser4/plugin/item/extent_file_ops.c |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/reiser4/plugin/item/extent_file_ops.c b/fs/reiser4/plugin/item/extent_file_ops.c
index 7afbca3..6e1ac01 100644
--- a/fs/reiser4/plugin/item/extent_file_ops.c
+++ b/fs/reiser4/plugin/item/extent_file_ops.c
@@ -1356,7 +1356,7 @@ static int extent_readpage_filler(void *data, struct page *page)

out:
	/* Calls to this function may be intermingled with VM writeback. */
-	reiser4_txn_restart_current();
+	txn_restart_current();
	return result;
}

-- 1.4.4.1.gaed4 






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

* [PATCH 6/10] Reiser4: fix calls to kmem_cache_destroy
  2006-12-03 13:49 Reiser4 for 2.6.19 Laurent Riffard
                   ` (4 preceding siblings ...)
  2006-12-03 13:50 ` [PATCH 5/10] Reiser4: release d_ref (fix) Laurent Riffard
@ 2006-12-03 13:50 ` Laurent Riffard
  2006-12-03 13:51 ` [PATCH 7/10] Reiser4: Replace inode.u.generic_ip with inode.i_private Laurent Riffard
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Laurent Riffard @ 2006-12-03 13:50 UTC (permalink / raw)
  To: reiserfs-list@namesys.com

Since Linux v2.6.19-rc1, kmem_cache_destroy() returns void because there
is very little filesystem driver code can do upon failed
kmem_cache_destroy().

This patch updates Reiser4 code to reflect this change. BTW, we do not
test anymore for null argument since kmem_cache_destroy does this check.
---
fs/reiser4/super_ops.c |    6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/fs/reiser4/super_ops.c b/fs/reiser4/super_ops.c
index 0f39702..04fa72d 100644
--- a/fs/reiser4/super_ops.c
+++ b/fs/reiser4/super_ops.c
@@ -589,11 +589,7 @@ static struct file_system_type reiser4_fs_type = {

void destroy_reiser4_cache(kmem_cache_t **cachep)
{
-	int result;
-
-	BUG_ON(*cachep == NULL);
-	result = kmem_cache_destroy(*cachep);
-	BUG_ON(result != 0);
+	kmem_cache_destroy(*cachep);
	*cachep = NULL;
}

-- 1.4.4.1.gaed4 



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

* [PATCH 7/10] Reiser4: Replace inode.u.generic_ip with inode.i_private
  2006-12-03 13:49 Reiser4 for 2.6.19 Laurent Riffard
                   ` (5 preceding siblings ...)
  2006-12-03 13:50 ` [PATCH 6/10] Reiser4: fix calls to kmem_cache_destroy Laurent Riffard
@ 2006-12-03 13:51 ` Laurent Riffard
  2006-12-03 13:51 ` [PATCH 8/10] Reiser4: inode.i_blksize suppression Laurent Riffard
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Laurent Riffard @ 2006-12-03 13:51 UTC (permalink / raw)
  To: reiserfs-list@namesys.com

inode.u.generic_ip was replaced with inode.i_private to reduce the size
of the VFS inode structure. This patch updates reiser4 code to reflect
this change.
---
fs/reiser4/inode.h                   |    2 +-
fs/reiser4/plugin/file/symlink.c     |   14 +++++++-------
fs/reiser4/plugin/inode_ops.c        |    6 +++---
fs/reiser4/plugin/item/static_stat.c |   18 +++++++++---------
4 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/fs/reiser4/inode.h b/fs/reiser4/inode.h
index ed59b0f..88b155d 100644
--- a/fs/reiser4/inode.h
+++ b/fs/reiser4/inode.h
@@ -41,7 +41,7 @@ typedef enum {
	REISER4_IMMUTABLE = 2,
	/* inode was read from storage */
	REISER4_LOADED = 3,
-	/* this bit is set for symlinks. inode->u.generic_ip points to target
+	/* this bit is set for symlinks. inode->i_private points to target
	   name of symlink. */
	REISER4_GENERIC_PTR_USED = 4,
	/* set if size of stat-data item for this inode is known. If this is
diff --git a/fs/reiser4/plugin/file/symlink.c b/fs/reiser4/plugin/file/symlink.c
index 343e72e..4f3f05a 100644
--- a/fs/reiser4/plugin/file/symlink.c
+++ b/fs/reiser4/plugin/file/symlink.c
@@ -42,8 +42,8 @@ int create_symlink(struct inode *symlink,
	 */
	reiser4_inode_data(symlink)->extmask |= (1 << SYMLINK_STAT);

-	assert("vs-838", symlink->u.generic_ip == NULL);
-	symlink->u.generic_ip = (void *)data->name;
+	assert("vs-838", symlink->i_private == NULL);
+	symlink->i_private = (void *)data->name;

	assert("vs-843", symlink->i_size == 0);
	INODE_SET_FIELD(symlink, i_size, strlen(data->name));
@@ -51,14 +51,14 @@ int create_symlink(struct inode *symlink,
	/* insert stat data appended with data->name */
	result = inode_file_plugin(symlink)->write_sd_by_inode(symlink);
	if (result) {
-		/* FIXME-VS: Make sure that symlink->u.generic_ip is not attached
+		/* FIXME-VS: Make sure that symlink->i_private is not attached
		   to kmalloced data */
		INODE_SET_FIELD(symlink, i_size, 0);
	} else {
-		assert("vs-849", symlink->u.generic_ip
+		assert("vs-849", symlink->i_private
		       && inode_get_flag(symlink, REISER4_GENERIC_PTR_USED));
		assert("vs-850",
-		       !memcmp((char *)symlink->u.generic_ip, data->name,
+		       !memcmp((char *)symlink->i_private, data->name,
			       (size_t) symlink->i_size + 1));
	}
	return result;
@@ -76,8 +76,8 @@ void destroy_inode_symlink(struct inode *inode)
	assert("edward-801", inode_get_flag(inode, REISER4_GENERIC_PTR_USED));
	assert("vs-839", S_ISLNK(inode->i_mode));

-	kfree(inode->u.generic_ip);
-	inode->u.generic_ip = NULL;
+	kfree(inode->i_private);
+	inode->i_private = NULL;
	inode_clr_flag(inode, REISER4_GENERIC_PTR_USED);
}

diff --git a/fs/reiser4/plugin/inode_ops.c b/fs/reiser4/plugin/inode_ops.c
index 73e6cbd..7c215af 100644
--- a/fs/reiser4/plugin/inode_ops.c
+++ b/fs/reiser4/plugin/inode_ops.c
@@ -389,16 +389,16 @@ int mknod_common(struct inode *parent, struct dentry *dentry,
*
* This is common implementation of vfs's followlink method of struct
* inode_operations.
- * Assumes that inode's generic_ip points to the content of symbolic link.
+ * Assumes that inode's i_private points to the content of symbolic link.
*/
void *follow_link_common(struct dentry *dentry, struct nameidata *nd)
{
	assert("vs-851", S_ISLNK(dentry->d_inode->i_mode));

-	if (!dentry->d_inode->u.generic_ip
+	if (!dentry->d_inode->i_private
	    || !inode_get_flag(dentry->d_inode, REISER4_GENERIC_PTR_USED))
		return ERR_PTR(RETERR(-EINVAL));
-	nd_set_link(nd, dentry->d_inode->u.generic_ip);
+	nd_set_link(nd, dentry->d_inode->i_private);
	return NULL;
}

diff --git a/fs/reiser4/plugin/item/static_stat.c b/fs/reiser4/plugin/item/static_stat.c
index d1a4a40..0ef01e6 100644
--- a/fs/reiser4/plugin/item/static_stat.c
+++ b/fs/reiser4/plugin/item/static_stat.c
@@ -430,21 +430,21 @@ save_large_times_sd(struct inode *inode /* object being processed */ ,

/* symlink stat data extension */

-/* allocate memory for symlink target and attach it to inode->u.generic_ip */
+/* allocate memory for symlink target and attach it to inode->i_private */
static int
symlink_target_to_inode(struct inode *inode, const char *target, int len)
{
-	assert("vs-845", inode->u.generic_ip == NULL);
+	assert("vs-845", inode->i_private == NULL);
	assert("vs-846", !inode_get_flag(inode, REISER4_GENERIC_PTR_USED));

	/* FIXME-VS: this is prone to deadlock. Not more than other similar
	   places, though */
-	inode->u.generic_ip = kmalloc((size_t) len + 1, get_gfp_mask());
-	if (!inode->u.generic_ip)
+	inode->i_private = kmalloc((size_t) len + 1, get_gfp_mask());
+	if (!inode->i_private)
		return RETERR(-ENOMEM);

-	memcpy((char *)(inode->u.generic_ip), target, (size_t) len);
-	((char *)(inode->u.generic_ip))[len] = 0;
+	memcpy((char *)(inode->i_private), target, (size_t) len);
+	((char *)(inode->i_private))[len] = 0;
	inode_set_flag(inode, REISER4_GENERIC_PTR_USED);
	return 0;
}
@@ -499,8 +499,8 @@ static int save_symlink_sd(struct inode *inode, char **area)
	if (!inode_get_flag(inode, REISER4_GENERIC_PTR_USED)) {
		const char *target;

-		target = (const char *)(inode->u.generic_ip);
-		inode->u.generic_ip = NULL;
+		target = (const char *)(inode->i_private);
+		inode->i_private = NULL;

		result = symlink_target_to_inode(inode, target, length);

@@ -510,7 +510,7 @@ static int save_symlink_sd(struct inode *inode, char **area)
	} else {
		/* there is nothing to do in update but move area */
		assert("vs-844",
-		       !memcmp(inode->u.generic_ip, sd->body,
+		       !memcmp(inode->i_private, sd->body,
			       (size_t) length + 1));
	}

-- 1.4.4.1.gaed4 



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

* [PATCH 8/10] Reiser4: inode.i_blksize suppression
  2006-12-03 13:49 Reiser4 for 2.6.19 Laurent Riffard
                   ` (6 preceding siblings ...)
  2006-12-03 13:51 ` [PATCH 7/10] Reiser4: Replace inode.u.generic_ip with inode.i_private Laurent Riffard
@ 2006-12-03 13:51 ` Laurent Riffard
  2006-12-03 13:51 ` [PATCH 9/10] Reiser4: remove unnecessary config.h includes Laurent Riffard
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Laurent Riffard @ 2006-12-03 13:51 UTC (permalink / raw)
  To: reiserfs-list@namesys.com

This patch updates the reiser4 code to reflect the suppression of the
inode.i_blksize field (see commit
ba52de123d454b57369f291348266d86f4b35070).
---
fs/reiser4/plugin/item/static_stat.c |    2 --
1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/fs/reiser4/plugin/item/static_stat.c b/fs/reiser4/plugin/item/static_stat.c
index 0ef01e6..f53a5aa 100644
--- a/fs/reiser4/plugin/item/static_stat.c
+++ b/fs/reiser4/plugin/item/static_stat.c
@@ -168,8 +168,6 @@ int init_inode_static_sd(struct inode *inode /* object being processed */ ,
			break;
	}
	state->extmask = bigmask;
-	/* common initialisations */
-	inode->i_blksize = get_super_private(inode->i_sb)->optimal_io_size;
	if (len - (bit / 16 * sizeof(d16)) > 0) {
		/* alignment in save_len_static_sd() is taken into account
		   -edward */
-- 1.4.4.1.gaed4 



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

* [PATCH 9/10] Reiser4: remove unnecessary config.h includes.
  2006-12-03 13:49 Reiser4 for 2.6.19 Laurent Riffard
                   ` (7 preceding siblings ...)
  2006-12-03 13:51 ` [PATCH 8/10] Reiser4: inode.i_blksize suppression Laurent Riffard
@ 2006-12-03 13:51 ` Laurent Riffard
  2006-12-03 13:51 ` [PATCH 10/10] reiser4-generic_file_read-fix Laurent Riffard
  2006-12-04 10:53 ` Reiser4 for 2.6.19 Guilherme Covolo
  10 siblings, 0 replies; 12+ messages in thread
From: Laurent Riffard @ 2006-12-03 13:51 UTC (permalink / raw)
  To: reiserfs-list@namesys.com

---
fs/reiser4/plugin/compress/compress.c |    1 -
fs/reiser4/reiser4.h                  |    1 -
2 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/fs/reiser4/plugin/compress/compress.c b/fs/reiser4/plugin/compress/compress.c
index 25d4dea..1a7122d 100644
--- a/fs/reiser4/plugin/compress/compress.c
+++ b/fs/reiser4/plugin/compress/compress.c
@@ -6,7 +6,6 @@
#include "../plugin.h"
#include "minilzo.h"

-#include <linux/config.h>
#include <linux/zlib.h>
#include <linux/types.h>
#include <linux/hardirq.h>
diff --git a/fs/reiser4/reiser4.h b/fs/reiser4/reiser4.h
index ec94eec..cdae341 100644
--- a/fs/reiser4/reiser4.h
+++ b/fs/reiser4/reiser4.h
@@ -6,7 +6,6 @@
#if !defined( __REISER4_H__ )
#define __REISER4_H__

-#include <linux/config.h>
#include <asm/param.h>		/* for HZ */
#include <linux/errno.h>
#include <linux/types.h>
-- 1.4.4.1.gaed4 



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

* [PATCH 10/10] reiser4-generic_file_read-fix
  2006-12-03 13:49 Reiser4 for 2.6.19 Laurent Riffard
                   ` (8 preceding siblings ...)
  2006-12-03 13:51 ` [PATCH 9/10] Reiser4: remove unnecessary config.h includes Laurent Riffard
@ 2006-12-03 13:51 ` Laurent Riffard
  2006-12-04 10:53 ` Reiser4 for 2.6.19 Guilherme Covolo
  10 siblings, 0 replies; 12+ messages in thread
From: Laurent Riffard @ 2006-12-03 13:51 UTC (permalink / raw)
  To: reiserfs-list@namesys.com

(From Edward Shishkin <edward.shishkin@gmail.com>)

Use do_sync_read() instead of generic_file_read()
---
fs/reiser4/plugin/file/cryptcompress.c |    2 +-
fs/reiser4/plugin/object.c             |    1 +
2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/reiser4/plugin/file/cryptcompress.c b/fs/reiser4/plugin/file/cryptcompress.c
index b587933..64137dc 100644
--- a/fs/reiser4/plugin/file/cryptcompress.c
+++ b/fs/reiser4/plugin/file/cryptcompress.c
@@ -2883,7 +2883,7 @@ ssize_t read_cryptcompress(struct file * file, char __user *buf, size_t size,
	down_read(&info->lock);
	LOCK_CNT_INC(inode_sem_r);

-	result = generic_file_read(file, buf, size, off);
+	result = do_sync_read(file, buf, size, off);

	up_read(&info->lock);
	LOCK_CNT_DEC(inode_sem_r);
diff --git a/fs/reiser4/plugin/object.c b/fs/reiser4/plugin/object.c
index a57ce06..9f11dd6 100644
--- a/fs/reiser4/plugin/object.c
+++ b/fs/reiser4/plugin/object.c
@@ -305,6 +305,7 @@ file_plugin file_plugins[LAST_FILE_PLUGIN_ID] = {
			.llseek = generic_file_llseek,
			.read = read_cryptcompress,
			.write = write_cryptcompress,
+			.aio_read = generic_file_aio_read,
			.mmap = mmap_cryptcompress,
			.release = release_cryptcompress,
			.fsync = sync_common,
-- 1.4.4.1.gaed4 





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

* Re: Reiser4 for 2.6.19
  2006-12-03 13:49 Reiser4 for 2.6.19 Laurent Riffard
                   ` (9 preceding siblings ...)
  2006-12-03 13:51 ` [PATCH 10/10] reiser4-generic_file_read-fix Laurent Riffard
@ 2006-12-04 10:53 ` Guilherme Covolo
  10 siblings, 0 replies; 12+ messages in thread
From: Guilherme Covolo @ 2006-12-04 10:53 UTC (permalink / raw)
  To: reiserfs-list

great job :)

Em Domingo 03 Dezembro 2006 11:49, Laurent Riffard escreveu:
> [this is a repost, since half of my previous mails didn't reach
>  reiserfs mailing-list]
>
> Hi,
>
> There is 10 patches in this series, first one is "Reiser4 for 2.6.18
> version 3". It's made up from the last Namesys Reiser4 patch for vanilla
> kernel
> (http://ftp.namesys.com/pub/reiser4-for-2.6/2.6.18/reiser4-for-2.6.18-3.pat
>ch.gz), updated to apply cleanly on top of 2.6.19 kernel. One can
> alternatively apply the original patch from Namesys
> (reiser4-for-2.6.18-3.patch.gz) on top of 2.6.19 kernel, it will
> successfully apply with some oddities.
>
> The 9 next patches are compile-fixes for 2.6.19 or bug-fixes I picked up
> from reiserfs mailing-list.
>
> Andrew Wade (3):
>     Reiser4: fix use after free in jrelse_tail
>     Reiser4: release d_ref
>     Reiser4: release d_ref (fix)
>
> Edward Shishkin (2):
>     Reiser4 for 2.6.18 version 3
>     reiser4-generic_file_read-fix
>
> Laurent Riffard (5):
>     Reiser4: cometics changes in mm/filemap.c.
>     Reiser4: fix calls to kmem_cache_destroy
>     Reiser4: Replace inode.u.generic_ip with inode.i_private
>     Reiser4: inode.i_blksize suppression
>     Reiser4: remove unnecessary config.h includes.
>
> The whole series is available as in a single patch:
> http://laurent.riffard.free.fr/reiser4/reiser4-for-2.6.19.patch.gz.
>
> I'm not a filesystem guru, nor I'm affiliated with Namesys. These
> patches just suit my needs. It works for me and I hope it will help
> somebody else.
>
> ~~
> laurent

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

end of thread, other threads:[~2006-12-04 10:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-03 13:49 Reiser4 for 2.6.19 Laurent Riffard
2006-12-03 13:49 ` [PATCH 1/10] Reiser4 for 2.6.18 version 3 Laurent Riffard
2006-12-03 13:50 ` [PATCH 2/10] Reiser4: cometics changes in mm/filemap.c Laurent Riffard
2006-12-03 13:50 ` [PATCH 3/10] Reiser4: fix use after free in jrelse_tail Laurent Riffard
2006-12-03 13:50 ` [PATCH 4/10] Reiser4: release d_ref Laurent Riffard
2006-12-03 13:50 ` [PATCH 5/10] Reiser4: release d_ref (fix) Laurent Riffard
2006-12-03 13:50 ` [PATCH 6/10] Reiser4: fix calls to kmem_cache_destroy Laurent Riffard
2006-12-03 13:51 ` [PATCH 7/10] Reiser4: Replace inode.u.generic_ip with inode.i_private Laurent Riffard
2006-12-03 13:51 ` [PATCH 8/10] Reiser4: inode.i_blksize suppression Laurent Riffard
2006-12-03 13:51 ` [PATCH 9/10] Reiser4: remove unnecessary config.h includes Laurent Riffard
2006-12-03 13:51 ` [PATCH 10/10] reiser4-generic_file_read-fix Laurent Riffard
2006-12-04 10:53 ` Reiser4 for 2.6.19 Guilherme Covolo

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.