> -----Original Message----- > From: Dan Williams [mailto:dan.j.williams@xxxxxxxxx] > Sent: Tuesday, October 6, 2015 1:12 PM > To: Song Liu <songliubraving@xxxxxx> > Cc: linux-raid <linux-raid@xxxxxxxxxxxxxxx>; Shaohua Li <shli@xxxxxx>; Neil > Brown <neilb@xxxxxxx>; Christoph Hellwig <hch@xxxxxxxxxxxxx> > Subject: Re: [PATCH 4/6] Assemble array with write journal > > On Fri, Aug 28, 2015 at 4:27 PM, Song Liu <songliubraving@xxxxxx> wrote: > > Example output: > > > > ./mdadm --assemble /dev/md0 /dev/sd[c-f] /dev/sdb1 > > mdadm: /dev/md0 has been started with 4 drives and 1 journal. > > > > mdadm checks superblock for journal devices. If the array appears to > > have a journal device, but it is not given, it will complain as > > > > ./mdadm --assemble /dev/md0 /dev/sd[c-f] > > mdadm: Not safe to assemble with journal device missing, consider --force. > > > > This can be overwritten with --force > > > > ./mdadm --assemble /dev/md0 /dev/sd[c-f] --force > > mdadm: Force start with missing journal device... > > mdadm: /dev/md0 has been started with 4 drives. > > > > Signed-off-by: Shaohua Li <shli@xxxxxx> > > Signed-off-by: Song Liu <songliubraving@xxxxxx> > [..] > > diff --git a/mdadm.h b/mdadm.h > > index 3cc1532..bc6680f 100644 > > --- a/mdadm.h > > +++ b/mdadm.h > > @@ -969,6 +969,9 @@ extern struct superswitch { > > /* validate container after assemble */ > > int (*validate_container)(struct mdinfo *info); > > > > + /* whether the array require a journal device */ > > + int (*require_journal)(struct supertype *st); > > + > > int swapuuid; /* true if uuid is bigending rather than hostendian */ > > int external; > > const char *name; /* canonical metadata name */ > > I'm wondering why is this a function pointer rather than a flag? Is it because > "roles" are only an internal detail of v1 superblocks? > Might be time to make them a first class citizen. Again, I would use that > generic "roles" enabling for a new rev of the SRT patches. Actually, I am planning to have require_journal1 just read MD_FEATURE_JOURNAL bit. But the feature_map is super 1 only. Not sure whether there is another flag for this. Thanks, Song ��.n��������+%������w��{.n�����{����w��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f