reiserfs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Overriding with node41 doesn't work.
@ 2016-01-05 13:18 Georgios Tsalikis
  2016-01-05 21:45 ` Edward Shishkin
  0 siblings, 1 reply; 3+ messages in thread
From: Georgios Tsalikis @ 2016-01-05 13:18 UTC (permalink / raw)
  To: reiserfs-devel

Or at least so it seems. Once i used node=node41 for checksums but the 
system showed node40. Now i did an fsck with override node=node41 trying 
to add the feature in a partition with node40. It reports node40 
afterwards. Any clues?


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

* Re: Overriding with node41 doesn't work.
  2016-01-05 13:18 Overriding with node41 doesn't work Georgios Tsalikis
@ 2016-01-05 21:45 ` Edward Shishkin
  2016-01-08  9:46   ` Edward Shishkin
  0 siblings, 1 reply; 3+ messages in thread
From: Edward Shishkin @ 2016-01-05 21:45 UTC (permalink / raw)
  To: Georgios Tsalikis, reiserfs-devel



On 01/05/2016 02:18 PM, Georgios Tsalikis wrote:
> Or at least so it seems. Once i used node=node41 for checksums but the 
> system showed node40.


Who exactly reports "node40"?


> Now i did an fsck with override node=node41 trying to add the feature 
> in a partition with node40. It reports node40 afterwards. Any clues?


You can specify node=node41 only when formatting a partition.
Different node formats in the same reiser4 volume are not supported.
Conversion of node formats are not implemented. To check the actual
node format, dump the tree with "debugfs.reiser4 -f -t /dev/xxx" and
grep for "NODE". If your nodes are managed by node41 plugin, then
you'll see the field "CSUM=xxxxx".

Thanks,
Edward.

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

* Re: Overriding with node41 doesn't work.
  2016-01-05 21:45 ` Edward Shishkin
@ 2016-01-08  9:46   ` Edward Shishkin
  0 siblings, 0 replies; 3+ messages in thread
From: Edward Shishkin @ 2016-01-08  9:46 UTC (permalink / raw)
  To: Georgios Tsalikis, reiserfs-devel

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

Hello.

The attached patch against reiser4progs-1.1.0 allows to print
node plugin without any tricky manipulations:

# debugfs.reiser4 -f /dev/xxx

[...]
Format super block (17):
format:        format40
version:    1
magic:        ReIsEr40FoRmAt
mkfs id:    0x10eca54c
flushes:    0
blocks:        128000
free blocks:    127970
root block:    23
node plugin:    0x1 (node41)
tail policy:    0x2 (smart)
next oid:    0x10000
file count:    1
tree height:    2
key policy:    LARGE
[...]

Thanks,
Edward.

On 01/05/2016 10:45 PM, Edward Shishkin wrote:
>
>
> On 01/05/2016 02:18 PM, Georgios Tsalikis wrote:
>> Or at least so it seems. Once i used node=node41 for checksums but 
>> the system showed node40.
>
>
> Who exactly reports "node40"?
>
>
>> Now i did an fsck with override node=node41 trying to add the feature 
>> in a partition with node40. It reports node40 afterwards. Any clues?
>
>
> You can specify node=node41 only when formatting a partition.
> Different node formats in the same reiser4 volume are not supported.
> Conversion of node formats are not implemented. To check the actual
> node format, dump the tree with "debugfs.reiser4 -f -t /dev/xxx" and
> grep for "NODE". If your nodes are managed by node41 plugin, then
> you'll see the field "CSUM=xxxxx".
>
> Thanks,
> Edward.


[-- Attachment #2: reiser4progs-format40-print-node-plugin-id.patch --]
[-- Type: text/x-patch, Size: 2164 bytes --]

Print node layout plugin id of the format40 super-block.

Signed-off-by: Edward Shishkin <edward.shishkin@gmail.com>
---
 plugin/format/format40/format40_repair.c |   31 ++++++++++++++++++-------------
 1 file changed, 18 insertions(+), 13 deletions(-)

--- a/plugin/format/format40/format40_repair.c
+++ b/plugin/format/format40/format40_repair.c
@@ -374,31 +374,33 @@ void format40_print(reiser4_format_ent_t
 		    uint16_t options) 
 {
 	format40_super_t *super;
-	reiser4_plug_t *plug;
+	reiser4_plug_t *tplug;
+	reiser4_plug_t *nplug;
 	format40_t *format;
-	rid_t pid;
-    
+	rid_t tpid;
+	rid_t npid;
+
 	aal_assert("vpf-246", entity != NULL);
 	aal_assert("umka-1290", stream != NULL);
 
 	format = (format40_t *)entity;
 	super = &format->super;
     
-	pid = get_sb_policy(super);
+	tpid = get_sb_policy(super);
+	npid = get_sb_node_pid(super);
+
+	if (!(tplug = format40_core->factory_ops.ifind(POLICY_PLUG_TYPE, tpid)))
+		aal_error("Can't find tail policy plugin by its id 0x%x.", tpid);
+
+	if (!(nplug = format40_core->factory_ops.ifind(NODE_PLUG_TYPE, npid)))
+		aal_error("Can't find node plugin by its id 0x%x.", npid);
 
-	if (!(plug = format40_core->factory_ops.ifind(POLICY_PLUG_TYPE, pid))) {
-		aal_error("Can't find tail policy plugin by its id 0x%x.", pid);
-	}
-		
 	aal_stream_format(stream, "Format super block (%lu):\n",
 			  FORMAT40_BLOCKNR(format->blksize));
 	
-	aal_stream_format(stream, "plugin:\t\t%s\n", 
+	aal_stream_format(stream, "format:\t\t%s\n",
 			  entity->plug->p.label);
 	
-	aal_stream_format(stream, "description:\t%s\n", 
-			  entity->plug->p.desc);
-
 	aal_stream_format(stream, "version:\t%u\n", 
 			  get_sb_version(super));
 	
@@ -420,8 +422,11 @@ void format40_print(reiser4_format_ent_t
 	aal_stream_format(stream, "root block:\t%llu\n", 
 			  get_sb_root_block(super));
 
+	aal_stream_format(stream, "node plugin:\t0x%x (%s)\n",
+			  npid, nplug ? nplug->label: "absent");
+
 	aal_stream_format(stream, "tail policy:\t0x%x (%s)\n",
-			  pid, plug ? plug->label: "absent");
+			  tpid, tplug ? tplug->label: "absent");
 	
 	aal_stream_format(stream, "next oid:\t0x%llx\n",
 			  get_sb_oid(super));

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

end of thread, other threads:[~2016-01-08  9:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-05 13:18 Overriding with node41 doesn't work Georgios Tsalikis
2016-01-05 21:45 ` Edward Shishkin
2016-01-08  9:46   ` Edward Shishkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).