Skip to contentSkip to conversation

reiser4 git repo

DISCUSSION Johannes Buchner 3 participants 4 messages Nov 27, 2009 – Nov 29, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

[ I sent this 2 days ago to [email protected], maybe I'll get more responses in here. ]

Hi!

I would like to keep a git repo up to date with current kernel development, with reiser4 patched in. I am having trouble finding a repo that provides reiser4. Is there one?

Some people may have noticed the last patch doesn't apply cleanly anymore. I made a few lines of modifications in my local repo. Maybe that repo would be interesting for others too*.

I plan to catch up with changes from kernel development on a daily/weekly basis; my /home partition is reiser4, so I am fairly serious about it.

At the moment, I fetch from torvalds/linux-2.6.git and stable/linux-2.6.31.y.git. Am I missing any other repositories that I should try to keep up with? (A fs subsystem maintainer repo?) next/linux-next.git is probably moving too fast for me.

Cheers,
Johannes

* How hard is it to get a git.kernel.org repo?

Signature · 8 lines
http://jakeapp.com/ http://johannes.jakeapp.com/blog/



-- 
Emails können geändert, gefälscht und eingesehen werden. Signiere oder
verschüssele deine Mails mit GPG.
http://web.student.tuwien.ac.at/~e0625457/pgp.html
#1 lore raw
Quoted 13 lines · Johannes Buchner

[ I sent this 2 days ago to [email protected], maybe I'll get more responses in here. ]

Hi!

I would like to keep a git repo up to date with current kernel development, with reiser4 patched in. I am having trouble finding a repo that provides reiser4. Is there one?

Some people may have noticed the last patch doesn't apply cleanly anymore. I made a few lines of modifications in my local repo. Maybe that repo would be interesting for others too*.

Quoted 8 lines

I plan to catch up with changes from kernel development on a daily/weekly basis; my /home partition is reiser4, so I am fairly serious about it.

At the moment, I fetch from torvalds/linux-2.6.git and stable/linux-2.6.31.y.git. Am I missing any other repositories that I should try to keep up with? (A fs subsystem maintainer repo?) next/linux-next.git is probably moving too fast for me.

You can try the -mm tree, the reiser 4 patches can be found inside:

http://userweb.kernel.org/~akpm/mmotm/

#2 lore raw

Hi,

I had some issues with the reiser4 patch series from -mm. First of all, I'm not sure what release they are based on. I used a8a8a669e from Linus' git repository. I applied all reiser4 patches (except reiser4-disable of course) from
http://userweb.kernel.org/~akpm/mmotm/, which worked fine.

I think these patches are based on the reiser4-2.6.30 patch. I also compared them to the reiser4-2.6.31 patch, which adds some missing pieces ([1] reiser4-from-2.6.31-patch.patch).

Additionally, some recent commits demand some changes, especially since current_is_pdflush and generic_sync_sb_inodes are not available any more (d8a8559cd7a9cc).
[2] reiser4-pdflush-comments.patch only fixes some comments which still mention pdflush.
In [3] reiser4-generic_sync_sb_inodes.patch I tried to replace generic_sync_sb_inodes. I am not 100% sure that this is correct, but that is what I understood from the commit diff+message of d8a8559cd7a9cc.

The original patch 'reiser4-vfs-add-super_operationssync_inodes' introduced the call from sync_inodes_sb to the super operation sync_inodes(sb, NULL). This NULL pointer is dereferenced in reiser4_sync_inodes, which is fixed by
[4] reiser4-sync_inodes-null-dereference.patch.

All 4 additional patches are attached. I can only say that it works on my machine, before I had compilation issues and freezes on 'sync'.

Cheers,
Johannes

PS: The git repo mentioned in
http://userweb.kernel.org/~akpm/mmotm/mmotm-readme.txt is not available.

Quoted 27 lines · On Fri, 27 Nov 2009 04:00:51 +0100 Frederic Weisbecker <[email protected]>…
Quoted 13 lines · Johannes Buchner

[ I sent this 2 days ago to [email protected], maybe I'll get more responses in here. ]

Hi!

I would like to keep a git repo up to date with current kernel development, with reiser4 patched in. I am having trouble finding a repo that provides reiser4. Is there one?

Some people may have noticed the last patch doesn't apply cleanly anymore. I made a few lines of modifications in my local repo. Maybe that repo would be interesting for others too*.

Quoted 8 lines

I plan to catch up with changes from kernel development on a daily/weekly basis; my /home partition is reiser4, so I am fairly serious about it.

At the moment, I fetch from torvalds/linux-2.6.git and stable/linux-2.6.31.y.git. Am I missing any other repositories that I should try to keep up with? (A fs subsystem maintainer repo?) next/linux-next.git is probably moving too fast for me.

You can try the -mm tree, the reiser 4 patches can be found inside:

http://userweb.kernel.org/~akpm/mmotm/

Signature · 3 lines
Emails können geändert, gefälscht und eingesehen werden. Signiere oder
verschüssele deine Mails mit GPG.
http://web.student.tuwien.ac.at/~e0625457/pgp.html

From: Johannes Buchner <[email protected]>

some changes from reiser4-2.6.31 patch
from http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/

fs/reiser4/carry.c +1 -1
Index: linux/fs/reiser4/carry.c
===================================================================
@@ -1095,7 +1095,7 @@ static void fatal_carry_error(carry_leve
  *
  * This function itself only manages changes in carry structures and delegates
  * all hard work (allocation of znode for new root, changes of parent and
- * sibling pointers to the reiser4_add_tree_root().
+ * sibling pointers) to the reiser4_add_tree_root().
  *
  * Locking: old tree root is locked by carry at this point. Fake znode is also
  * locked.
fs/reiser4/carry_ops.c +1 -1
Index: linux/fs/reiser4/carry_ops.c
===================================================================
@@ -2015,7 +2015,7 @@ static int carry_estimate_bitmaps(void)
 		int bytes;
 
 		bytes = capped_height() * (0 +	/* bnode should be added, but
-						 * its is private to bitmap.c,
+						 * it is private to bitmap.c,
 						 * skip for now. */
 					   2 * sizeof(jnode));
 						/* working and commit jnodes */
fs/reiser4/coord.c +4 -4
Index: linux/fs/reiser4/coord.c
===================================================================
@@ -36,12 +36,12 @@ void coord_normalize(coord_t *coord)
 
 	coord_clear_iplug(coord);
 
-	if (node_is_empty(node))
+	if (node_is_empty(node)) {
 		coord_init_first_unit(coord, node);
-	 else if ((coord->between == AFTER_ITEM)
-		   || (coord->between == AFTER_UNIT))
+	} else if ((coord->between == AFTER_ITEM)
+		   || (coord->between == AFTER_UNIT)) {
 		return;
-	 else if (coord->item_pos == coord_num_items(coord)
+	} else if (coord->item_pos == coord_num_items(coord)
 		   && coord->between == BEFORE_ITEM) {
 		coord_dec_item_pos(coord);
 		coord->between = AFTER_ITEM;
fs/reiser4/entd.c +1 -1
Index: linux/fs/reiser4/entd.c
===================================================================
@@ -241,7 +241,7 @@ static void entd_flush(struct super_bloc
 	if (rq->wbc->nr_to_write > 0) {
 		rq->wbc->range_start = 0;
 		rq->wbc->range_end = LLONG_MAX;
-		generic_sync_sb_inodes(rq->wbc);
+		generic_sync_sb_inodes(super, rq->wbc);
 	}
 	rq->wbc->nr_to_write = ENTD_CAPTURE_APAGE_BURST;
 	reiser4_writeout(super, rq->wbc);
fs/reiser4/super_ops.c +1 -1
Index: linux/fs/reiser4/super_ops.c
===================================================================
@@ -412,7 +412,7 @@ static void reiser4_sync_inodes(struct s
 	 * call reiser4_writepages for each of dirty inodes to turn dirty pages
 	 * into transactions if they were not yet.
 	 */
-	generic_sync_sb_inodes(wbc);
+	generic_sync_sb_inodes(super, wbc);
 
 	/* flush goes here */
 	wbc->nr_to_write = to_write;
fs/reiser4/znode.h +0 -1
Index: linux/fs/reiser4/znode.h
===================================================================
@@ -18,7 +18,6 @@
 
 #include <linux/types.h>
 #include <linux/spinlock.h>
-#include <linux/semaphore.h>
 #include <linux/pagemap.h>	/* for PAGE_CACHE_SIZE */
 #include <asm/atomic.h>
 
include/linux/mm.h +1 -0
Index: linux/include/linux/mm.h
===================================================================
@@ -836,6 +836,7 @@ int redirty_page_for_writepage(struct wr
 void account_page_dirtied(struct page *page, struct address_space *mapping);
 int set_page_dirty(struct page *page);
 int set_page_dirty_lock(struct page *page);
+int set_page_dirty_notag(struct page *page);
 int clear_page_dirty_for_io(struct page *page);
 
 extern unsigned long move_page_tables(struct vm_area_struct *vma,
mm/filemap.c +3 -1
Index: linux/mm/filemap.c
===================================================================
@@ -139,6 +139,7 @@ void __remove_from_page_cache(struct pag
 		dec_bdi_stat(mapping->backing_dev_info, BDI_RECLAIMABLE);
 	}
 }
+EXPORT_SYMBOL(__remove_from_page_cache);
 
 void remove_from_page_cache(struct page *page)
 {
@@ -151,6 +152,7 @@ void remove_from_page_cache(struct page 
 	spin_unlock_irq(&mapping->tree_lock);
 	mem_cgroup_uncharge_cache_page(page);
 }
+EXPORT_SYMBOL(remove_from_page_cache);
 
 static int sync_page(void *word)
 {
@@ -800,7 +802,6 @@ repeat:
 	rcu_read_unlock();
 	return ret;
 }
-EXPORT_SYMBOL(find_get_pages);
 
 /**
  * find_get_pages_contig - gang contiguous pagecache lookup
@@ -970,6 +971,7 @@ static void shrink_readahead_size_eio(st
 {
 	ra->ra_pages /= 4;
 }
+EXPORT_SYMBOL(find_get_pages);
 
 /**
  * do_generic_file_read - generic file read routine
mm/page-writeback.c +26 -0
Index: linux/mm/page-writeback.c
===================================================================
@@ -1143,6 +1143,32 @@ int __set_page_dirty_nobuffers(struct pa
 EXPORT_SYMBOL(__set_page_dirty_nobuffers);
 
 /*
+ * set_page_dirty_notag() -- similar to __set_page_dirty_nobuffers()
+ * except it doesn't tag the page dirty in the page-cache radix tree.
+ * This means that the address space using this cannot use the regular
+ * filemap ->writepages() helpers and must provide its own means of
+ * tracking and finding non-tagged dirty pages.
+ *
+ * NOTE: furthermore, this version also doesn't handle truncate races.
+ */
+int set_page_dirty_notag(struct page *page)
+{
+	struct address_space *mapping = page->mapping;
+
+	if (!TestSetPageDirty(page)) {
+		unsigned long flags;
+		WARN_ON_ONCE(!PagePrivate(page) && !PageUptodate(page));
+		local_irq_save(flags);
+		account_page_dirtied(page, mapping);
+		local_irq_restore(flags);
+		__mark_inode_dirty(mapping->host, I_DIRTY_PAGES);
+		return 1;
+	}
+	return 0;
+}
+EXPORT_SYMBOL(set_page_dirty_notag);
+
+/*
  * When a writepage implementation decides that it doesn't want to write this
  * page for some reason, it should redirty the locked page via
  * redirty_page_for_writepage() and it should then unlock the page and return 0

From: Johannes Buchner <[email protected]>

some comments were still mentioning pdflush

fs/reiser4/context.c +1 -1
index eed3efa..f80ae13 100644
@@ -147,7 +147,7 @@ static void reiser4_throttle_write_at(reiser4_context *context)
 	 * call balance_dirty_pages_ratelimited() to process formatted nodes
 	 * dirtied during this system call. Do that only if we are not in mount
 	 * and there were nodes dirtied in this context and we are not in
-	 * writepage (to avoid deadlock) and not in pdflush
+	 * writepage (to avoid deadlock)
 	 */
 	if (sbinfo != NULL && sbinfo->fake != NULL &&
 	    context->nr_marked_dirty != 0 &&
fs/reiser4/txnmgr.c +2 -2
index 74b49f2..844d19e 100644
@@ -1360,7 +1360,7 @@ static int txn_try_to_fuse_small_atom(txn_mgr * tmgr, txn_atom * atom)
    code tries to flush current atom.
 
    flush_some_atom() is called as part of memory clearing process. It is
-   invoked from balance_dirty_pages(), pdflushd, and entd.
+   invoked from balance_dirty_pages() and entd.
 
    If we can flush no nodes, atom is committed, because this frees memory.
 
@@ -1469,7 +1469,7 @@ flush_some_atom(jnode * start, long *nr_submitted, const struct writeback_contro
 			 * or atom is too old/large,
 			 * we force current atom to commit */
 			/* wait for commit completion but only if this
-			 * wouldn't stall pdflushd and ent thread. */
+			 * wouldn't stall ent thread. */
 			if (!wbc->nonblocking && !ctx->entd)
 				txnh->flags |= TXNH_WAIT_COMMIT;
 			atom->flags |= ATOM_FORCE_COMMIT;

From: Johannes Buchner <[email protected]>

generic_sync_sb_inodes doesn't exist anymore

fs/reiser4/entd.c +3 -1
Index: linux/fs/reiser4/entd.c
===================================================================
@@ -241,7 +241,9 @@ static void entd_flush(struct super_bloc
 	if (rq->wbc->nr_to_write > 0) {
 		rq->wbc->range_start = 0;
 		rq->wbc->range_end = LLONG_MAX;
-		generic_sync_sb_inodes(super, rq->wbc);
+		writeback_inodes_sb(super);
+		if (rq->wbc->sync_mode == WB_SYNC_ALL)
+			sync_inodes_sb(super);
 	}
 	rq->wbc->nr_to_write = ENTD_CAPTURE_APAGE_BURST;
 	reiser4_writeout(super, rq->wbc);
fs/reiser4/super_ops.c +3 -1
Index: linux/fs/reiser4/super_ops.c
===================================================================
@@ -412,7 +412,9 @@ static void reiser4_sync_inodes(struct s
 	 * call reiser4_writepages for each of dirty inodes to turn dirty pages
 	 * into transactions if they were not yet.
 	 */
-	generic_sync_sb_inodes(super, wbc);
+	writeback_inodes_sb(super);
+	if (wbc->sync_mode == WB_SYNC_ALL)
+		sync_inodes_sb(super);
 
 	/* flush goes here */
 	wbc->nr_to_write = to_write;

From: Johannes Buchner <[email protected]>

the parameter wbc=NULL caused a NULL pointer dereference in reiser4_sync_inodes.

introduced in patch reiser4-vfs-add-super_operationssync_inodes

fs/reiser4/super_ops.c +1 -1
Index: linux/fs/reiser4/super_ops.c
===================================================================
@@ -395,7 +395,7 @@ static void reiser4_sync_inodes(struct s
 	reiser4_context *ctx;
 	long to_write;
 
-	if (wbc->for_kupdate)
+	if (wbc == NULL || wbc->for_kupdate)
 		/* reiser4 has its own means of periodical write-out */
 		return;
 
#3 lore raw
Quoted 2 lines · Johannes Buchner

Hi,

Hello

Quoted 26 lines

I had some issues with the reiser4 patch series from -mm. First of all, I'm not sure what release they are based on. I used a8a8a669e from Linus' git repository. I applied all reiser4 patches (except reiser4-disable of course) from
http://userweb.kernel.org/~akpm/mmotm/, which worked fine.

I think these patches are based on the reiser4-2.6.30 patch. I also compared them to the reiser4-2.6.31 patch, which adds some missing pieces ([1] reiser4-from-2.6.31-patch.patch).

Additionally, some recent commits demand some changes, especially since current_is_pdflush and generic_sync_sb_inodes are not available any more (d8a8559cd7a9cc).
[2] reiser4-pdflush-comments.patch only fixes some comments which still mention pdflush.
In [3] reiser4-generic_sync_sb_inodes.patch I tried to replace generic_sync_sb_inodes. I am not 100% sure that this is correct, but that is what I understood from the commit diff+message of d8a8559cd7a9cc.

The original patch 'reiser4-vfs-add-super_operationssync_inodes' introduced the call from sync_inodes_sb to the super operation sync_inodes(sb, NULL). This NULL pointer is dereferenced in reiser4_sync_inodes, which is fixed by
[4] reiser4-sync_inodes-null-dereference.patch.

Quoted 9 lines

All 4 additional patches are attached. I can only say that it works on my machine, before I had compilation issues and freezes on 'sync'.

Cheers,
Johannes

PS: The git repo mentioned in
http://userweb.kernel.org/~akpm/mmotm/mmotm-readme.txt is not available.

Yeah, you can find it now at git.zen-kernel.org. They had to switch the adress.

Have fun

Dushan

Quoted 38 lines
Quoted 24 lines · On Fri, 27 Nov 2009 04:00:51 +0100 Frederic Weisbecker <[email protected]>…
Quoted 13 lines · Johannes Buchner

[ I sent this 2 days ago to [email protected], maybe I'll get more responses in here. ]

Hi!

I would like to keep a git repo up to date with current kernel development, with reiser4 patched in. I am having trouble finding a repo that provides reiser4. Is there one?

Some people may have noticed the last patch doesn't apply cleanly anymore. I made a few lines of modifications in my local repo. Maybe that repo would be interesting for others too*.

Quoted 8 lines

I plan to catch up with changes from kernel development on a daily/weekly basis; my /home partition is reiser4, so I am fairly serious about it.

At the moment, I fetch from torvalds/linux-2.6.git and stable/linux-2.6.31.y.git. Am I missing any other repositories that I should try to keep up with? (A fs subsystem maintainer repo?) next/linux-next.git is probably moving too fast for me.

Quoted 3 lines

You can try the -mm tree, the reiser 4 patches can be found inside:

http://userweb.kernel.org/~akpm/mmotm/

--
Emails können geändert, gefälscht und eingesehen werden. Signiere oder verschüssele deine Mails mit GPG.
http://web.student.tuwien.ac.at/~e0625457/pgp.html