public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Drokin <green@namesys.com>
To: marcelo@conectiva.com.br, linux-kernel@vger.kernel.org,
	reiserfs-dev@namesys.com
Cc: adilger@turbolabs.com
Subject: [PATCH] UUID & volume labels support for reiserfs
Date: Wed, 9 Jan 2002 15:55:04 +0300	[thread overview]
Message-ID: <20020109155504.A4551@namesys.com> (raw)

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

Hello!

    Attached is the patch that reserves space for volume label and UUID in reiserfs v3.6 superblock.
    It also generates random UUID for volumes converted from 3.5 to 3.6 format by the kernel.
    Original patch author is Andreas Dilger <adilger@turbolabs.com>.
    Please apply.

Bye,
    Oleg

[-- Attachment #2: v3.6_uuid_support-1.diff --]
[-- Type: text/plain, Size: 1650 bytes --]

--- linux/fs/reiserfs/objectid.c.orig	Tue Jan  8 16:04:06 2002
+++ linux/fs/reiserfs/objectid.c	Tue Jan  8 17:45:15 2002
@@ -5,6 +5,7 @@
 #include <linux/config.h>
 #include <linux/string.h>
 #include <linux/locks.h>
+#include <linux/random.h>
 #include <linux/sched.h>
 #include <linux/reiserfs_fs.h>
 
@@ -195,6 +196,10 @@
 
     /* set the max size so we don't overflow later */
     disk_sb->s_oid_maxsize = cpu_to_le16(new_size) ;
+
+    /* Zero out label and generate random UUID */
+    memset(disk_sb->s_label, 0, sizeof(disk_sb->s_label)) ;
+    generate_random_uuid(disk_sb->s_uuid);
 
     /* finally, zero out the unused chunk of the new super */
     memset(disk_sb->s_unused, 0, sizeof(disk_sb->s_unused)) ;
--- linux/include/linux/reiserfs_fs_sb.h.orig	Tue Jan  8 16:05:59 2002
+++ linux/include/linux/reiserfs_fs_sb.h	Tue Jan  8 17:34:22 2002
@@ -61,7 +61,13 @@
                                    superblock. -Hans */
   __u16 s_reserved;
   __u32 s_inode_generation;
-  char s_unused[124] ;			/* zero filled by mkreiserfs */
+  __u32 s_flags;		       /* Right now used only by inode-attributes, if enabled */
+  unsigned char s_uuid[16];            /* filesystem unique identifier */
+  unsigned char s_label[16];           /* filesystem volume label */
+  char s_unused[88] ;                  /* zero filled by mkreiserfs and
+                                        * reiserfs_convert_objectid_map_v1()
+                                        * so any additions must be updated
+                                        * there as well. */
 } __attribute__ ((__packed__));
 
 #define SB_SIZE (sizeof(struct reiserfs_super_block))

             reply	other threads:[~2002-01-09 12:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-09 12:55 Oleg Drokin [this message]
2002-01-09 15:47 ` [reiserfs-dev] [PATCH] UUID & volume labels support for reiserfs Chris Mason
2002-01-09 15:58   ` Oleg Drokin
2002-01-09 16:07     ` Chris Mason
2002-01-09 16:25       ` Oleg Drokin
2002-01-09 16:38         ` Chris Mason
2002-01-09 16:44           ` Oleg Drokin
2002-01-09 17:14             ` Chris Mason
2002-01-11  9:23               ` Oleg Drokin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020109155504.A4551@namesys.com \
    --to=green@namesys.com \
    --cc=adilger@turbolabs.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=reiserfs-dev@namesys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox