* Could reiserfsprogs display volume labels when doing fsck upon boot?
@ 2005-10-14 9:40 Wiktor Wandachowicz
2005-10-14 10:09 ` Raymond A. Meijer
2005-10-14 12:07 ` Vitaly Fertman
0 siblings, 2 replies; 12+ messages in thread
From: Wiktor Wandachowicz @ 2005-10-14 9:40 UTC (permalink / raw)
To: reiserfs-list
Recently I've changed a filesystem on one of my patitions from ext3 to
reiserfs 3.6.
All of my partitions have labels (hint: "mke2fs -L") so at boot I can easily see
which partitions are fsck-ed. So while reformatting my last partition /dev/hda8
as reiserfs 3.6, I've labeled it too (hint: "mkreiserfs -l").
Alas, upon boot reiserfsck never displays a volume label set this way, only:
Reiserfs super block in block 16 on 0x307 of format 3.6 with standard journal
While ext2/ext3 fsck displays a neat message for every partition it checks, like:
BOOT: clean, 62/297256 files, 60311/594405 blocks
So, I wanted to ask you: is adding such a functionality to reiserfsck a good idea?
I've tried to add it myself and it turned out to be four lines in one source file
(well, two lines actually doing the job, because one line is a comment and another
one contains a curly bracket). I have a small patch against reiserfsprogs-3.6.19
(applicable to the 3.6.18 and 3.6.17) ready to be sent.
Now my reiserfsck tests if volume label exists, and in such case displays it like:
SPARE: Reiserfs super block in block 16 on 0x307 of format 3.6 with standard journal
And yes, I know it's cosmetic :-)
But for me it's nice to have. This way my system behaves in a more consistent way.
Maintainers I asked from my distribution suggested to ask my question at the source.
What is your opinion then, reiserfs people?
Friendly,
Wiktor Wandachowicz
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Could reiserfsprogs display volume labels when doing fsck upon boot?
2005-10-14 9:40 Could reiserfsprogs display volume labels when doing fsck upon boot? Wiktor Wandachowicz
@ 2005-10-14 10:09 ` Raymond A. Meijer
2005-10-14 10:13 ` Raymond A. Meijer
2005-10-14 10:30 ` jp.guillemin
2005-10-14 12:07 ` Vitaly Fertman
1 sibling, 2 replies; 12+ messages in thread
From: Raymond A. Meijer @ 2005-10-14 10:09 UTC (permalink / raw)
To: reiserfs-list
On Friday 14 October 2005 12:40, Wiktor Wandachowicz wrote:
[...]
> Now my reiserfsck tests if volume label exists, and in such case
> displays it like:
>
> SPARE: Reiserfs super block in block 16 on 0x307 of format 3.6 with
> standard journal
[..]
> What is your opinion then, reiserfs people?
I can't speak for the Namesys people, but personally I think it's a
brilliant idea!
Ray
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Could reiserfsprogs display volume labels when doing fsck upon boot?
2005-10-14 10:09 ` Raymond A. Meijer
@ 2005-10-14 10:13 ` Raymond A. Meijer
2005-10-14 10:30 ` jp.guillemin
1 sibling, 0 replies; 12+ messages in thread
From: Raymond A. Meijer @ 2005-10-14 10:13 UTC (permalink / raw)
To: reiserfs-list
On Friday 14 October 2005 13:09, Raymond A. Meijer wrote:
> I can't speak for the Namesys people, but personally I think it's a
> brilliant idea!
And now that I think about it...can the same thing be done for Reiser4?
And is it possible to change/create a Reiser4 Label AFTER the Filesystem
has been created?
Thanks,
Ray
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Could reiserfsprogs display volume labels when doing fsck upon boot?
2005-10-14 10:09 ` Raymond A. Meijer
2005-10-14 10:13 ` Raymond A. Meijer
@ 2005-10-14 10:30 ` jp.guillemin
2005-10-14 10:57 ` Wiktor Wandachowicz
1 sibling, 1 reply; 12+ messages in thread
From: jp.guillemin @ 2005-10-14 10:30 UTC (permalink / raw)
To: Raymond A. Meijer; +Cc: reiserfs-list
I think the idea is "basically" great , and I would like to see such a feature
in reiser3 & reiser4...
Just IMHO ;)
JP
Selon "Raymond A. Meijer" <rmeijer@internet.gr>:
> On Friday 14 October 2005 12:40, Wiktor Wandachowicz wrote:
>
> [...]
>
> > Now my reiserfsck tests if volume label exists, and in such case
> > displays it like:
> >
> > SPARE: Reiserfs super block in block 16 on 0x307 of format 3.6 with
> > standard journal
>
> [..]
>
> > What is your opinion then, reiserfs people?
>
> I can't speak for the Namesys people, but personally I think it's a
> brilliant idea!
>
>
> Ray
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Could reiserfsprogs display volume labels when doing fsck upon boot?
2005-10-14 10:30 ` jp.guillemin
@ 2005-10-14 10:57 ` Wiktor Wandachowicz
2005-10-14 11:32 ` Yiannis Mavroukakis
0 siblings, 1 reply; 12+ messages in thread
From: Wiktor Wandachowicz @ 2005-10-14 10:57 UTC (permalink / raw)
To: reiserfs-list
<jp.guillemin <at> free.fr> writes:
> I think the idea is "basically" great , and I would like to see such a feature
> in reiser3 & reiser4...
>
> Just IMHO ;)
>
> JP
Well, I've checked the source and actually all the needed data were already in
place. I mean: the reiserfs_super_block structure contains the needed s_label
field. So I've changed a bit one source file and voila! Now the volume label is
shown exactly as I would like it to see.
The whole point is to change the print_super_block function in the
reiserfscore/prints.c file, as following:
=== QUOTE BEGIN ===
/* return 1 if this is not super block */
int print_super_block (FILE * fp, reiserfs_filsys_t * fs, char * file_name,
struct buffer_head * bh, int short_print)
{
struct reiserfs_super_block * sb =
(struct reiserfs_super_block *)(bh->b_data);
dev_t rdev;
int format = 0;
__u16 state;
if (!does_look_like_super_block (sb))
return 1;
rdev = misc_device_rdev(file_name);
/* Print volume label if it is non-empty. */
if (sb->s_label[0]) {
reiserfs_warning (fp, "%s: ", sb->s_label);
}
reiserfs_warning (fp, "Reiserfs super block in block %lu on 0x%x of ",
bh->b_blocknr, rdev);
switch (get_reiserfs_format (sb)) {
=== QUOTE END ===
For reiserfs-3.6.19, .18 & .17 I just needed to add the following test
(I don't have older versions, but I suppose it's also applicable):
/* Print volume label if it is non-empty. */
if (sb->s_label[0]) {
reiserfs_warning (fp, "%s: ", sb->s_label);
}
I think I'll send that as a patch to the Namesys, like they say on their
website: http://namesys.com/code.html, with all the needed legal mambo-jumbo
from: http://namesys.com/legalese.html
Vote for this feature enhancement and maybe they will incorporate it mainstream.
IMHO it's quick, easy, sane and adds some value at the same time.
I can't say if the same is possible for ReiserFS v.4 because I don't use it.
Friendly,
Wiktor
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Could reiserfsprogs display volume labels when doing fsck upon boot?
2005-10-14 10:57 ` Wiktor Wandachowicz
@ 2005-10-14 11:32 ` Yiannis Mavroukakis
0 siblings, 0 replies; 12+ messages in thread
From: Yiannis Mavroukakis @ 2005-10-14 11:32 UTC (permalink / raw)
To: Wiktor Wandachowicz; +Cc: reiserfs-list
Wiktor Wandachowicz wrote:
><jp.guillemin <at> free.fr> writes:
>
>
>
>>I think the idea is "basically" great , and I would like to see such a feature
>>in reiser3 & reiser4...
>>
>>Just IMHO ;)
>>
>>JP
>>
>>
>
>Well, I've checked the source and actually all the needed data were already in
>place. I mean: the reiserfs_super_block structure contains the needed s_label
>field. So I've changed a bit one source file and voila! Now the volume label is
>shown exactly as I would like it to see.
>
>The whole point is to change the print_super_block function in the
>reiserfscore/prints.c file, as following:
>
>=== QUOTE BEGIN ===
>/* return 1 if this is not super block */
>int print_super_block (FILE * fp, reiserfs_filsys_t * fs, char * file_name,
> struct buffer_head * bh, int short_print)
>{
> struct reiserfs_super_block * sb =
> (struct reiserfs_super_block *)(bh->b_data);
> dev_t rdev;
> int format = 0;
> __u16 state;
>
> if (!does_look_like_super_block (sb))
> return 1;
>
> rdev = misc_device_rdev(file_name);
>
> /* Print volume label if it is non-empty. */
> if (sb->s_label[0]) {
> reiserfs_warning (fp, "%s: ", sb->s_label);
> }
> reiserfs_warning (fp, "Reiserfs super block in block %lu on 0x%x of ",
> bh->b_blocknr, rdev);
> switch (get_reiserfs_format (sb)) {
>=== QUOTE END ===
>
>For reiserfs-3.6.19, .18 & .17 I just needed to add the following test
>(I don't have older versions, but I suppose it's also applicable):
>
> /* Print volume label if it is non-empty. */
> if (sb->s_label[0]) {
> reiserfs_warning (fp, "%s: ", sb->s_label);
> }
>
>I think I'll send that as a patch to the Namesys, like they say on their
>website: http://namesys.com/code.html, with all the needed legal mambo-jumbo
>from: http://namesys.com/legalese.html
>
>Vote for this feature enhancement and maybe they will incorporate it mainstream.
>IMHO it's quick, easy, sane and adds some value at the same time.
>
>I can't say if the same is possible for ReiserFS v.4 because I don't use it.
>
>Friendly,
>Wiktor
>
>
>
I've found this method in Reiser4 sources
reiser4_master_get_label(fs->master)
And I am assuming this function from libreiser4/master.c
/* Reads master super block from disk */
reiser4_master_t *reiser4_master_open(aal_device_t *device) {
would be where to call the reiser4_master_get_label method...I'll try to
modify the code and see if my assumptions are correct.
Yiannis.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Could reiserfsprogs display volume labels when doing fsck upon boot?
2005-10-14 9:40 Could reiserfsprogs display volume labels when doing fsck upon boot? Wiktor Wandachowicz
2005-10-14 10:09 ` Raymond A. Meijer
@ 2005-10-14 12:07 ` Vitaly Fertman
2005-10-14 12:07 ` Raymond A. Meijer
1 sibling, 1 reply; 12+ messages in thread
From: Vitaly Fertman @ 2005-10-14 12:07 UTC (permalink / raw)
To: reiserfs-list; +Cc: Wiktor Wandachowicz
On Friday 14 October 2005 13:40, Wiktor Wandachowicz wrote:
> Recently I've changed a filesystem on one of my patitions from ext3 to
> reiserfs 3.6.
>
> All of my partitions have labels (hint: "mke2fs -L") so at boot I can easily see
> which partitions are fsck-ed. So while reformatting my last partition /dev/hda8
> as reiserfs 3.6, I've labeled it too (hint: "mkreiserfs -l").
>
> Alas, upon boot reiserfsck never displays a volume label set this way, only:
>
> Reiserfs super block in block 16 on 0x307 of format 3.6 with standard journal
>
> While ext2/ext3 fsck displays a neat message for every partition it checks, like:
>
> BOOT: clean, 62/297256 files, 60311/594405 blocks
>
>
> So, I wanted to ask you: is adding such a functionality to reiserfsck a good idea?
> I've tried to add it myself and it turned out to be four lines in one source file
> (well, two lines actually doing the job, because one line is a comment and another
> one contains a curly bracket). I have a small patch against reiserfsprogs-3.6.19
> (applicable to the 3.6.18 and 3.6.17) ready to be sent.
>
> Now my reiserfsck tests if volume label exists, and in such case displays it like:
>
> SPARE: Reiserfs super block in block 16 on 0x307 of format 3.6 with standard journal
>
>
> And yes, I know it's cosmetic :-)
>
> But for me it's nice to have. This way my system behaves in a more consistent way.
> Maintainers I asked from my distribution suggested to ask my question at the source.
> What is your opinion then, reiserfs people?
ok, I will add it.
--
Vitaly
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Could reiserfsprogs display volume labels when doing fsck upon boot?
2005-10-14 12:07 ` Vitaly Fertman
@ 2005-10-14 12:07 ` Raymond A. Meijer
2005-10-14 12:20 ` Vitaly Fertman
0 siblings, 1 reply; 12+ messages in thread
From: Raymond A. Meijer @ 2005-10-14 12:07 UTC (permalink / raw)
To: reiserfs-list
On Friday 14 October 2005 15:07, Vitaly Fertman wrote:
[...]
> ok, I will add it.
Vitaly, is it possible to add labels to Reiser4 filesystems AFTER mkfs,
or only during mkfs?
Thanks,
Ray
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Could reiserfsprogs display volume labels when doing fsck upon boot?
2005-10-14 12:07 ` Raymond A. Meijer
@ 2005-10-14 12:20 ` Vitaly Fertman
2005-10-15 12:19 ` Yiannis Mavroukakis
0 siblings, 1 reply; 12+ messages in thread
From: Vitaly Fertman @ 2005-10-14 12:20 UTC (permalink / raw)
To: reiserfs-list; +Cc: Raymond A. Meijer
On Friday 14 October 2005 16:07, Raymond A. Meijer wrote:
> On Friday 14 October 2005 15:07, Vitaly Fertman wrote:
>
> [...]
>
> > ok, I will add it.
>
> Vitaly, is it possible to add labels to Reiser4 filesystems AFTER mkfs,
> or only during mkfs?
only on mkfs time for now.
--
Vitaly
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Could reiserfsprogs display volume labels when doing fsck upon boot?
2005-10-14 12:20 ` Vitaly Fertman
@ 2005-10-15 12:19 ` Yiannis Mavroukakis
2005-10-17 10:03 ` Vitaly Fertman
0 siblings, 1 reply; 12+ messages in thread
From: Yiannis Mavroukakis @ 2005-10-15 12:19 UTC (permalink / raw)
Cc: reiserfs-list
Vitaly Fertman wrote:
>On Friday 14 October 2005 16:07, Raymond A. Meijer wrote:
>
>
>>On Friday 14 October 2005 15:07, Vitaly Fertman wrote:
>>
>>[...]
>>
>>
>>
>>>ok, I will add it.
>>>
>>>
>>Vitaly, is it possible to add labels to Reiser4 filesystems AFTER mkfs,
>>or only during mkfs?
>>
>>
>
>only on mkfs time for now.
>
>
>
For reiser4, would this do it?
in function *reiser4_master_open(aal_device_t *device) in
libreiser4/master.c
/* Reiser4 master super block is not found on the device. */
if (aal_strncmp(SUPER(master)->ms_magic, REISER4_MASTER_MAGIC,
sizeof(REISER4_MASTER_MAGIC)) != 0)
{
aal_fatal("Wrong magic found in the master "
"super block.");
goto error_free_master;
}
/* Print volume label */
aal_mess(reiser4_master_get_label(master));
return master;
error_free_master:
aal_free(master);
return NULL;
Stab in the dark :P
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Could reiserfsprogs display volume labels when doing fsck upon boot?
2005-10-15 12:19 ` Yiannis Mavroukakis
@ 2005-10-17 10:03 ` Vitaly Fertman
2005-10-17 10:21 ` Yiannis Mavroukakis
0 siblings, 1 reply; 12+ messages in thread
From: Vitaly Fertman @ 2005-10-17 10:03 UTC (permalink / raw)
To: reiserfs-list; +Cc: Yiannis Mavroukakis
On Saturday 15 October 2005 16:19, Yiannis Mavroukakis wrote:
> Vitaly Fertman wrote:
>
> >On Friday 14 October 2005 16:07, Raymond A. Meijer wrote:
> >
> >
> >>On Friday 14 October 2005 15:07, Vitaly Fertman wrote:
> >>
> >>[...]
> >>
> >>
> >>
> >>>ok, I will add it.
> >>>
> >>>
> >>Vitaly, is it possible to add labels to Reiser4 filesystems AFTER mkfs,
> >>or only during mkfs?
> >>
> >>
> >
> >only on mkfs time for now.
> >
> >
> >
> For reiser4, would this do it?
> in function *reiser4_master_open(aal_device_t *device) in
> libreiser4/master.c
>
> /* Reiser4 master super block is not found on the device. */
> if (aal_strncmp(SUPER(master)->ms_magic, REISER4_MASTER_MAGIC,
> sizeof(REISER4_MASTER_MAGIC)) != 0)
> {
> aal_fatal("Wrong magic found in the master "
> "super block.");
> goto error_free_master;
> }
> /* Print volume label */
> aal_mess(reiser4_master_get_label(master));
>
> return master;
>
> error_free_master:
> aal_free(master);
> return NULL;
>
>
> Stab in the dark :P
I would put it into fsck after fs gets opened to not force
all callers to get this message.
however, 'fsck.reiser4 -a' does not perform any check yet
and does not even open fs.
--
Vitaly
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Could reiserfsprogs display volume labels when doing fsck upon boot?
2005-10-17 10:03 ` Vitaly Fertman
@ 2005-10-17 10:21 ` Yiannis Mavroukakis
0 siblings, 0 replies; 12+ messages in thread
From: Yiannis Mavroukakis @ 2005-10-17 10:21 UTC (permalink / raw)
To: reiserfs-list
Vitaly Fertman wrote:
>>For reiser4, would this do it?
>>in function *reiser4_master_open(aal_device_t *device) in
>>libreiser4/master.c
>>
>> /* Reiser4 master super block is not found on the device. */
>> if (aal_strncmp(SUPER(master)->ms_magic, REISER4_MASTER_MAGIC,
>> sizeof(REISER4_MASTER_MAGIC)) != 0)
>> {
>> aal_fatal("Wrong magic found in the master "
>> "super block.");
>> goto error_free_master;
>> }
>> /* Print volume label */
>> aal_mess(reiser4_master_get_label(master));
>>
>> return master;
>>
>> error_free_master:
>> aal_free(master);
>> return NULL;
>>
>>
>>Stab in the dark :P
>>
>>
>
>I would put it into fsck after fs gets opened to not force
>all callers to get this message.
>however, 'fsck.reiser4 -a' does not perform any check yet
>and does not even open fs.
>
>
>
Hello Vitaly,
Thanks for the info. Here is where I show my ignorance so bear with
me..Can the caller be "identified" somehow? Say for
example, a mount operation or an fsck, then output the system label if
there is one..or does this sort of cosmetic touch not fit
in libreiser?
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-10-17 10:21 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-14 9:40 Could reiserfsprogs display volume labels when doing fsck upon boot? Wiktor Wandachowicz
2005-10-14 10:09 ` Raymond A. Meijer
2005-10-14 10:13 ` Raymond A. Meijer
2005-10-14 10:30 ` jp.guillemin
2005-10-14 10:57 ` Wiktor Wandachowicz
2005-10-14 11:32 ` Yiannis Mavroukakis
2005-10-14 12:07 ` Vitaly Fertman
2005-10-14 12:07 ` Raymond A. Meijer
2005-10-14 12:20 ` Vitaly Fertman
2005-10-15 12:19 ` Yiannis Mavroukakis
2005-10-17 10:03 ` Vitaly Fertman
2005-10-17 10:21 ` Yiannis Mavroukakis
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.