- Reduce maximum bitmap usage when working with bitmap files,
so that a only single-page allocations are made, even on
64bit hosts with 4K pages.
+ - Close stray fd in mdassemble so that it can assemble stacked
+ devices
+ - If mdassemble finds an array already assembled, it marks it
+ read-write.
Changes Prior to 2.5.4 release
- When creating devices in /dev/md/ create matching symlinks
STATICSRC = pwgr.c
STATICOBJS = pwgr.o
-ASSEMBLE_SRCS := mdassemble.c Assemble.c config.c dlink.c util.c super0.c super1.c sha1.c
+ASSEMBLE_SRCS := mdassemble.c Assemble.c Manage.c config.c dlink.c util.c super0.c super1.c sha1.c
ASSEMBLE_FLAGS:= $(CFLAGS) -DMDASSEMBLE
ifdef MDASSEMBLE_AUTO
ASSEMBLE_SRCS += mdopen.c mdstat.c
return 0;
}
+#ifndef MDASSEMBLE
+
int Manage_runstop(char *devname, int fd, int runstop, int quiet)
{
/* Run or stop the array. array must already be configured
return 0;
}
+#endif
.B mdassemble
has the same effect as invoking
.B mdadm --assemble --scan.
+.PP
+Invoking
+.B mdassemble
+a second time will make all defined arrays readwrite, this is useful if
+using the
+.B start_ro
+module parameter.
.SH OPTIONS
.PP
.BR mdadm (8),
.BR mdadm.conf (5),
-.BR md (4).
-.PP
+.BR md (4),
.BR diet (1).
rv |= 1;
continue;
}
- if (ioctl(mdfd, GET_ARRAY_INFO, &array)>=0)
- /* already assembled, skip */
- continue;
- rv |= Assemble(array_list->st, array_list->devname, mdfd,
- array_list,
- NULL, NULL,
+ if (ioctl(mdfd, GET_ARRAY_INFO, &array) < 0) {
+ rv |= Assemble(array_list->st, array_list->devname, mdfd,
+ array_list, NULL, NULL,
readonly, runstop, NULL, NULL, verbose, force);
+ } else {
+ rv |= Manage_ro(array_list->devname, mdfd, -1); /* make it readwrite */
+ }
+ close(mdfd);
}
return rv;
}
}
}
+#ifndef MDASSEMBLE
int check_ext2(int fd, char *name)
{
/*
fprintf(stderr, Name ": assuming 'no'\n");
return 0;
}
+#endif /* MDASSEMBLE */
char *map_num(mapping_t *map, int num)
{
return csum;
}
+#ifndef MDASSEMBLE
char *human_size(long long bytes)
{
static char buf[30];
);
return buf;
}
+#endif
+#if !defined(MDASSEMBLE) || defined(MDASSEMBLE) && defined(MDASSEMBLE_AUTO)
int get_mdp_major(void)
{
static int mdp_major = -1;
if (strncmp(name, "/dev/.tmp.md", 12)==0)
unlink(name);
}
+#endif /* !defined(MDASSEMBLE) || defined(MDASSEMBLE) && defined(MDASSEMBLE_AUTO) */
int dev_open(char *dev, int flags)
{