[Ocfs2-users] OCFS2 and Snapshots
Sunil Mushran
Sunil.Mushran at oracle.com
Fri Jul 21 11:45:50 CDT 2006
Please could you send it to me again in the "diff -u -p" format.
Andre Brinkmann wrote:
> Sorry,
>
> here the patch as text:
>
> For the Makefile:
>
> 39c39
> < $(LINK) $(LIBOCFS2_LIBS) $(LIBO2DLM_LIBS) $(LIBO2CB_LIBS)
> $(COM_ERR_LIBS)
> ---
> > $(LINK) $(LIBOCFS2_LIBS) $(UUID_LIBS) $(LIBO2DLM_LIBS)
> $(LIBO2CB_LIBS) $(COM_ERR_LIBS)
>
>
> For tunefs.ocfs2.c:
>
> 46a47
> > #include <uuid/uuid.h>
> 72a74
> > int uuid;
> 87c89
> < "\t[-J journal-options] [-S volume-size] [-qvV] "
> ---
> > "\t[-J journal-options] [-S volume-size] [-qvuV] "
> 244a247
> > { "uuid-reset", 0, 0, 'u'},
> 257c260
> < c = getopt_long(argc, argv, "L:N:J:S:vqVx", long_options,
> ---
> > c = getopt_long(argc, argv, "L:N:J:S:vquVx", long_options,
> 305a309,312
> > case 'u':
> > opts.uuid = 1;
> > break;
> >
> 473a481,512
> >
> > static void update_uuid (ocfs2_filesys *fs, int *changed)
> > {
> > unsigned char *uuid = OCFS2_RAW_SB(fs->fs_super)->s_uuid;
> > size_t i, max = sizeof(OCFS2_RAW_SB(fs->fs_super)->s_uuid);
> > uuid_t uuid_new;
> >
> > /* print out old uuid of device */
> > printf ("Try to change uuid: \n");
> > for(i = 0; i < max; i++)
> > printf("%02x ", uuid[i]);
> >
> > printf("\n");
> >
> > /* generate new uuid */
> > uuid_generate(uuid_new);
> >
> > memset (OCFS2_RAW_SB(fs->fs_super)->s_uuid, 0,
> OCFS2_VOL_UUID_LEN);
> > memcpy (OCFS2_RAW_SB(fs->fs_super)->s_uuid, uuid_new,
> OCFS2_VOL_UUID_LEN);
> >
> > /* print out new uuid */
> > printf ("New uuid: \n");
> > for(i = 0; i < max; i++)
> > printf("%02x ", uuid[i]);
> >
> > printf("\n");
> >
> > *changed = 1;
> >
> > return ;
> > }
> >
> 555a595
> > int upd_uuid = 0;
> 676a717,720
> > /* update unique serial number of device has been selected */
> > if (opts.uuid)
> > printf (" Change unique serial number of device \n ");
> >
> 692a737,743
> > /* update the unique serial number */
> > if (opts.uuid) {
> > update_uuid (fs, &upd_uuid);
> > if (upd_uuid)
> > printf ("Changed volume uuid \n");
> > }
> >
> 729c780
> < if (upd_label || upd_slots || upd_vsize) {
> ---
> > if (upd_label || upd_slots || upd_vsize || upd_uuid) {
>
>
> _______________________________________________
> Ocfs2-users mailing list
> Ocfs2-users at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-users
>
More information about the Ocfs2-users
mailing list