Imported reiserfsprogs-3.6.20
This commit is contained in:
1 parent
0ed773997f
commit
dac518d099
189 files changed
+43353
-29787
No files matched your search
@@ -0,0 +1,27 @@
|
||||
sbin_PROGRAMS = tunefs.reiserfs
|
||||
|
||||
man_MANS = tunefs.reiserfs.8
|
||||
EXTRA_DIST = tunefs.reiserfs.8
|
||||
|
||||
tunefs_reiserfs_SOURCES = tune.c tune.h
|
||||
tunefs_reiserfs_LDADD = $(top_builddir)/libreiserfs/libreiserfs-static.a \
|
||||
$(top_builddir)/libutil/libutil-static.a \
|
||||
$(top_builddir)/libmisc/libmisc-static.a
|
||||
tunefs_reiserfs_LDFLAGS = @PROGS_LDFLAGS@
|
||||
tunefs_reiserfs_CFLAGS = @CFLAGS@
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
|
||||
uninstall-reiserfstune:
|
||||
if test -f $(DESTDIR)$(sbindir)/reiserfstune; then \
|
||||
rm -f $(DESTDIR)$(sbindir)/reiserfstune; \
|
||||
fi;
|
||||
|
||||
install-reiserfstune:
|
||||
if test -f $(DESTDIR)$(sbindir)/tunefs.reiserfs; then \
|
||||
rm -f $(DESTDIR)$(sbindir)/reiserfstune; \
|
||||
ln $(DESTDIR)$(sbindir)/tunefs.reiserfs $(DESTDIR)$(sbindir)/reiserfstune; \
|
||||
fi;
|
||||
|
||||
install-data-local: install-reiserfstune
|
||||
uninstall-local: uninstall-reiserfstune
|
||||
@@ -0,0 +1,501 @@
|
||||
# Makefile.in generated by automake 1.9.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SOURCES = $(tunefs_reiserfs_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
sbin_PROGRAMS = tunefs.reiserfs$(EXEEXT)
|
||||
subdir = utils/tune
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"
|
||||
sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(sbin_PROGRAMS)
|
||||
am_tunefs_reiserfs_OBJECTS = tunefs_reiserfs-tune.$(OBJEXT)
|
||||
tunefs_reiserfs_OBJECTS = $(am_tunefs_reiserfs_OBJECTS)
|
||||
tunefs_reiserfs_DEPENDENCIES = \
|
||||
$(top_builddir)/libreiserfs/libreiserfs-static.a \
|
||||
$(top_builddir)/libutil/libutil-static.a \
|
||||
$(top_builddir)/libmisc/libmisc-static.a
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(tunefs_reiserfs_SOURCES)
|
||||
DIST_SOURCES = $(tunefs_reiserfs_SOURCES)
|
||||
man8dir = $(mandir)/man8
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PROGS_LDFLAGS = @PROGS_LDFLAGS@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
UUID_LIBS = @UUID_LIBS@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
man_MANS = tunefs.reiserfs.8
|
||||
EXTRA_DIST = tunefs.reiserfs.8
|
||||
tunefs_reiserfs_SOURCES = tune.c tune.h
|
||||
tunefs_reiserfs_LDADD = $(top_builddir)/libreiserfs/libreiserfs-static.a \
|
||||
$(top_builddir)/libutil/libutil-static.a \
|
||||
$(top_builddir)/libmisc/libmisc-static.a
|
||||
|
||||
tunefs_reiserfs_LDFLAGS = @PROGS_LDFLAGS@
|
||||
tunefs_reiserfs_CFLAGS = @CFLAGS@
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/tune/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu utils/tune/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-sbinPROGRAMS: $(sbin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)"
|
||||
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-sbinPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(sbindir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-sbinPROGRAMS:
|
||||
-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
|
||||
tunefs.reiserfs$(EXEEXT): $(tunefs_reiserfs_OBJECTS) $(tunefs_reiserfs_DEPENDENCIES)
|
||||
@rm -f tunefs.reiserfs$(EXEEXT)
|
||||
$(LINK) $(tunefs_reiserfs_LDFLAGS) $(tunefs_reiserfs_OBJECTS) $(tunefs_reiserfs_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tunefs_reiserfs-tune.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
tunefs_reiserfs-tune.o: tune.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tunefs_reiserfs_CFLAGS) $(CFLAGS) -MT tunefs_reiserfs-tune.o -MD -MP -MF "$(DEPDIR)/tunefs_reiserfs-tune.Tpo" -c -o tunefs_reiserfs-tune.o `test -f 'tune.c' || echo '$(srcdir)/'`tune.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tunefs_reiserfs-tune.Tpo" "$(DEPDIR)/tunefs_reiserfs-tune.Po"; else rm -f "$(DEPDIR)/tunefs_reiserfs-tune.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tune.c' object='tunefs_reiserfs-tune.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tunefs_reiserfs_CFLAGS) $(CFLAGS) -c -o tunefs_reiserfs-tune.o `test -f 'tune.c' || echo '$(srcdir)/'`tune.c
|
||||
|
||||
tunefs_reiserfs-tune.obj: tune.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tunefs_reiserfs_CFLAGS) $(CFLAGS) -MT tunefs_reiserfs-tune.obj -MD -MP -MF "$(DEPDIR)/tunefs_reiserfs-tune.Tpo" -c -o tunefs_reiserfs-tune.obj `if test -f 'tune.c'; then $(CYGPATH_W) 'tune.c'; else $(CYGPATH_W) '$(srcdir)/tune.c'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tunefs_reiserfs-tune.Tpo" "$(DEPDIR)/tunefs_reiserfs-tune.Po"; else rm -f "$(DEPDIR)/tunefs_reiserfs-tune.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tune.c' object='tunefs_reiserfs-tune.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tunefs_reiserfs_CFLAGS) $(CFLAGS) -c -o tunefs_reiserfs-tune.obj `if test -f 'tune.c'; then $(CYGPATH_W) 'tune.c'; else $(CYGPATH_W) '$(srcdir)/tune.c'; fi`
|
||||
uninstall-info-am:
|
||||
install-man8: $(man8_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)"
|
||||
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.8*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
8*) ;; \
|
||||
*) ext='8' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \
|
||||
done
|
||||
uninstall-man8:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.8*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
8*) ;; \
|
||||
*) ext='8' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \
|
||||
rm -f "$(DESTDIR)$(man8dir)/$$inst"; \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS) $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-data-local install-man
|
||||
|
||||
install-exec-am: install-sbinPROGRAMS
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man: install-man8
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-local uninstall-man \
|
||||
uninstall-sbinPROGRAMS
|
||||
|
||||
uninstall-man: uninstall-man8
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-sbinPROGRAMS ctags distclean distclean-compile \
|
||||
distclean-generic distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-data-local install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-man8 install-sbinPROGRAMS install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-info-am uninstall-local uninstall-man \
|
||||
uninstall-man8 uninstall-sbinPROGRAMS
|
||||
|
||||
|
||||
uninstall-reiserfstune:
|
||||
if test -f $(DESTDIR)$(sbindir)/reiserfstune; then \
|
||||
rm -f $(DESTDIR)$(sbindir)/reiserfstune; \
|
||||
fi;
|
||||
|
||||
install-reiserfstune:
|
||||
if test -f $(DESTDIR)$(sbindir)/tunefs.reiserfs; then \
|
||||
rm -f $(DESTDIR)$(sbindir)/reiserfstune; \
|
||||
ln $(DESTDIR)$(sbindir)/tunefs.reiserfs $(DESTDIR)$(sbindir)/reiserfstune; \
|
||||
fi;
|
||||
|
||||
install-data-local: install-reiserfstune
|
||||
uninstall-local: uninstall-reiserfstune
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,753 @@
|
||||
/*
|
||||
* Copyright 2002-2004 by Hans Reiser, licensing governed by
|
||||
* reiserfsprogs/README
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "tune.h"
|
||||
#include "misc/unaligned.h"
|
||||
#include "util/misc.h"
|
||||
#include "util/badblock.h"
|
||||
#include "util/device.h"
|
||||
#include "util/print.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <getopt.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#if 0
|
||||
#include <getopt.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
char *program_name;
|
||||
|
||||
static void message( const char * fmt, ... )
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
static void message( const char * fmt, ... )
|
||||
{
|
||||
char buf[4096];
|
||||
va_list args;
|
||||
|
||||
buf[0] = '\0';
|
||||
va_start( args, fmt );
|
||||
vsprintf( buf, fmt, args );
|
||||
va_end( args );
|
||||
|
||||
if( buf[0] != '\0' ) {
|
||||
fprintf( stderr, "%s: %s\n", program_name, buf );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
reiserfs_filsys_t * fs;
|
||||
|
||||
static void print_usage_and_exit(void)
|
||||
{
|
||||
message ("Usage: %s [options] device [block-count]\n"
|
||||
"\n"
|
||||
"Options:\n\n"
|
||||
" -j | --journal-device file\tcurrent journal device\n"
|
||||
" --journal-new-device file\tnew journal device\n"
|
||||
" -o | --journal-new-offset N\tnew journal offset in blocks\n"
|
||||
" -s | --journal-new-size N\tnew journal size in blocks\n"
|
||||
" -t | --trans-max-size N\tnew journal max transaction size in blocks\n"
|
||||
" --no-journal-available\tcurrent journal is not available\n"
|
||||
" --make-journal-standard\tnew journal to be standard\n"
|
||||
/*"\t-p | --keep-old-journal-param (keep parametrs from old journal to new one)\n"*/
|
||||
" -b | --add-badblocks file\tadd to bad block list\n"
|
||||
" -B | --badblocks file\t\tset the bad block list\n"
|
||||
" -u | --uuid UUID|random\tset new UUID\n"
|
||||
" -l | --label LABEL\t\tset new label\n"
|
||||
" -f | --force\t\t\tforce tuning, less confirmations\n"
|
||||
" -V\t\t\t\tprint version and exit\n", program_name);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
unsigned long Journal_size = 0;
|
||||
int Max_trans_size = JOURNAL_TRANS_MAX;
|
||||
int Offset = 0;
|
||||
__u16 Options = 0;
|
||||
int Force = 0;
|
||||
int Bads = 0;
|
||||
char * LABEL;
|
||||
unsigned char UUID[16];
|
||||
char * badblocks_file;
|
||||
|
||||
/* If specified paramenters defines the standard journal, make it standard. */
|
||||
static int should_make_journal_standard (reiserfs_filsys_t * fs, char * j_new_dev_name)
|
||||
{
|
||||
if (!reiserfs_super_jr_magic (fs->fs_ondisk_sb))
|
||||
return 0;
|
||||
/*
|
||||
if (!util_user_confirmed (stderr, "ATTENTION! Filesystem with non-standard journal "
|
||||
"found. Continue? (y/n):", "y\n")) {
|
||||
exit(1);
|
||||
}
|
||||
*/
|
||||
/* make sure journal is on main device, it has default size
|
||||
and the file system has non-standard magic */
|
||||
|
||||
if (j_new_dev_name) {
|
||||
/* new journal was specified - check if it is available */
|
||||
if (strcmp (j_new_dev_name, fs->fs_file_name))
|
||||
return 0;
|
||||
|
||||
if (Journal_size && Journal_size !=
|
||||
reiserfs_journal_default(fs->fs_super_bh->b_blocknr, fs->fs_blocksize) + 1)
|
||||
return 0;
|
||||
|
||||
if (Max_trans_size && (Max_trans_size != JOURNAL_TRANS_MAX))
|
||||
return 0;
|
||||
} else {
|
||||
/* new journal was not specified - check ondisk journal params */
|
||||
|
||||
if (reiserfs_sb_get_reserved(fs->fs_ondisk_sb) <
|
||||
reiserfs_journal_default (fs->fs_super_bh->b_blocknr, fs->fs_blocksize) + 1)
|
||||
{
|
||||
message ("Can not create standard journal of the size %llu",
|
||||
reiserfs_journal_default(fs->fs_super_bh->b_blocknr, fs->fs_blocksize) + 1);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int set_standard_journal_params (reiserfs_filsys_t * fs)
|
||||
{
|
||||
reiserfs_bh_t * bh;
|
||||
|
||||
/* ondisk superblock update */
|
||||
|
||||
if (reiserfs_sb_get_version(fs->fs_ondisk_sb) == 0)
|
||||
memcpy (fs->fs_ondisk_sb->s_v1.s_magic, REISERFS_3_5_SUPER_MAGIC_STRING,
|
||||
strlen (REISERFS_3_5_SUPER_MAGIC_STRING));
|
||||
else if (reiserfs_sb_get_version(fs->fs_ondisk_sb) == 2)
|
||||
memcpy (fs->fs_ondisk_sb->s_v1.s_magic, REISERFS_3_6_SUPER_MAGIC_STRING,
|
||||
strlen (REISERFS_3_6_SUPER_MAGIC_STRING));
|
||||
else {
|
||||
message ("Can not set standard reiserfs magic: unknown format found %u,"
|
||||
" try reiserfsck first", reiserfs_sb_get_version(fs->fs_ondisk_sb));
|
||||
return 0;
|
||||
}
|
||||
|
||||
reiserfs_jp_set_start (reiserfs_sb_jp(fs->fs_ondisk_sb), reiserfs_journal_start_must (fs));
|
||||
reiserfs_jp_set_dev (reiserfs_sb_jp(fs->fs_ondisk_sb), 0);
|
||||
reiserfs_jp_set_size (reiserfs_sb_jp(fs->fs_ondisk_sb), reiserfs_journal_default(fs->fs_super_bh->b_blocknr, fs->fs_blocksize));
|
||||
|
||||
if (reiserfs_jp_get_tlen(reiserfs_sb_jp(fs->fs_ondisk_sb)) != JOURNAL_TRANS_MAX)
|
||||
reiserfs_jp_set_tlen(reiserfs_sb_jp(fs->fs_ondisk_sb), JOURNAL_TRANS_MAX);
|
||||
if (reiserfs_jp_get_max_batch(reiserfs_sb_jp(fs->fs_ondisk_sb)) != JOURNAL_MAX_BATCH)
|
||||
reiserfs_jp_set_max_batch(reiserfs_sb_jp(fs->fs_ondisk_sb), JOURNAL_MAX_BATCH);
|
||||
if (reiserfs_jp_get_commit_age(reiserfs_sb_jp(fs->fs_ondisk_sb)) != JOURNAL_MAX_COMMIT_AGE)
|
||||
reiserfs_jp_set_commit_age(reiserfs_sb_jp(fs->fs_ondisk_sb), JOURNAL_MAX_COMMIT_AGE);
|
||||
if (reiserfs_jp_get_trans_age(reiserfs_sb_jp(fs->fs_ondisk_sb)) != JOURNAL_MAX_TRANS_AGE)
|
||||
reiserfs_jp_set_trans_age(reiserfs_sb_jp(fs->fs_ondisk_sb), JOURNAL_MAX_TRANS_AGE);
|
||||
reiserfs_sb_set_reserved (fs->fs_ondisk_sb, 0);
|
||||
|
||||
/* journal_header update */
|
||||
bh = reiserfs_buffer_open(fs->fs_journal_dev,
|
||||
reiserfs_jp_get_start(reiserfs_sb_jp(fs->fs_ondisk_sb)) +
|
||||
reiserfs_jp_get_size(reiserfs_sb_jp(fs->fs_ondisk_sb)), fs->fs_blocksize);
|
||||
|
||||
if (!bh) {
|
||||
message ("Cannot get the journal header block. reiserfs_buffer_open failed.\n");
|
||||
return 0;
|
||||
}
|
||||
((struct reiserfs_journal_header *)(bh->b_data))->jh_journal = *(reiserfs_sb_jp(fs->fs_ondisk_sb));
|
||||
reiserfs_buffer_mkuptodate (bh, 1);
|
||||
reiserfs_buffer_mkdirty (bh);
|
||||
reiserfs_buffer_write(bh);
|
||||
reiserfs_buffer_close(bh);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void zero_journal (reiserfs_filsys_t * fs)
|
||||
{
|
||||
unsigned int i;
|
||||
reiserfs_bh_t * bh;
|
||||
unsigned long done;
|
||||
unsigned long start, len;
|
||||
|
||||
|
||||
fprintf (stderr, "Initializing journal - ");
|
||||
|
||||
start = reiserfs_jp_get_start (reiserfs_sb_jp (fs->fs_ondisk_sb));
|
||||
len = reiserfs_jp_get_size (reiserfs_sb_jp (fs->fs_ondisk_sb));
|
||||
done = 0;
|
||||
for (i = 0; i < len; i ++) {
|
||||
util_misc_progress (stderr, &done, len, 1, 2);
|
||||
bh = reiserfs_buffer_open (fs->fs_journal_dev, start + i, fs->fs_blocksize);
|
||||
if (!bh)
|
||||
misc_die ("zero_journal: reiserfs_buffer_open failed");
|
||||
memset (bh->b_data, 0, bh->b_size);
|
||||
reiserfs_buffer_mkdirty (bh);
|
||||
reiserfs_buffer_mkuptodate (bh, 1);
|
||||
reiserfs_buffer_write (bh);
|
||||
reiserfs_buffer_close (bh);
|
||||
}
|
||||
|
||||
fprintf (stderr, "\n");
|
||||
fflush (stderr);
|
||||
}
|
||||
|
||||
|
||||
static int str2int (char * str)
|
||||
{
|
||||
int val;
|
||||
char * tmp;
|
||||
|
||||
val = (int) strtol (str, &tmp, 0);
|
||||
if (*tmp)
|
||||
misc_die ("%s: strtol is unable to make an integer of %s\n", program_name, str);
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
static void set_transaction_max_size (char * str)
|
||||
{
|
||||
Max_trans_size = str2int( str );
|
||||
}
|
||||
|
||||
|
||||
/* journal must fit into number of blocks pointed by first bitmap */
|
||||
static void set_journal_device_size (char * str)
|
||||
{
|
||||
Journal_size = str2int (str) ;
|
||||
}
|
||||
|
||||
|
||||
static void set_offset_in_journal_device (char * str)
|
||||
{
|
||||
Offset = str2int( str );
|
||||
}
|
||||
|
||||
|
||||
static void callback_new_badblocks(reiserfs_filsys_t *fs,
|
||||
reiserfs_path_t *badblock_path,
|
||||
void *data)
|
||||
{
|
||||
reiserfs_ih_t *tmp_ih;
|
||||
__u32 *ind_item, i;
|
||||
|
||||
tmp_ih = REISERFS_PATH_IH(badblock_path);
|
||||
ind_item = (__u32 *)REISERFS_PATH_ITEM(badblock_path);
|
||||
|
||||
for (i = 0; i < reiserfs_ext_count(tmp_ih); i++) {
|
||||
if (reiserfs_bitmap_test_bit(fs->fs_badblocks_bm,
|
||||
d32_get (ind_item, i)))
|
||||
{
|
||||
message("Block %u is marked as bad already.",
|
||||
d32_get (ind_item, i));
|
||||
|
||||
reiserfs_bitmap_clear_bit(fs->fs_badblocks_bm,
|
||||
d32_get (ind_item, i));
|
||||
}
|
||||
}
|
||||
|
||||
reiserfs_tree_pathrelse (badblock_path);
|
||||
}
|
||||
|
||||
static void callback_clear_badblocks(reiserfs_filsys_t *fs,
|
||||
reiserfs_path_t *badblock_path,
|
||||
void *data)
|
||||
{
|
||||
reiserfs_ih_t *tmp_ih;
|
||||
__u32 *ind_item, i;
|
||||
|
||||
tmp_ih = REISERFS_PATH_IH(badblock_path);
|
||||
ind_item = (__u32 *)REISERFS_PATH_ITEM(badblock_path);
|
||||
|
||||
for (i = 0; i < reiserfs_ext_count(tmp_ih); i++) {
|
||||
reiserfs_bitmap_clear_bit(fs->fs_bitmap2,
|
||||
d32_get(ind_item, i));
|
||||
}
|
||||
|
||||
reiserfs_tree_pathrelse (badblock_path);
|
||||
}
|
||||
|
||||
static void add_badblocks(reiserfs_filsys_t *fs) {
|
||||
unsigned long i, marked = 0;
|
||||
|
||||
if (reiserfs_bitmap_open (fs) < 0) {
|
||||
message("Failed to open reiserfs ondisk bitmap.\n");
|
||||
reiserfs_fs_close(fs);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (util_badblock_load (fs, badblocks_file)) {
|
||||
message("Failed to initialize the bad block bitmap.\n");
|
||||
reiserfs_fs_close(fs);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (Bads == 1)
|
||||
reiserfs_badblock_traverse(fs, callback_new_badblocks, NULL);
|
||||
else
|
||||
reiserfs_badblock_traverse(fs, callback_clear_badblocks, NULL);
|
||||
|
||||
for (i = 0; i < reiserfs_sb_get_blocks (fs->fs_ondisk_sb); i ++) {
|
||||
if (reiserfs_bitmap_test_bit (fs->fs_badblocks_bm, i)) {
|
||||
if (!reiserfs_bitmap_test_bit (fs->fs_bitmap2, i)) {
|
||||
reiserfs_bitmap_set_bit (fs->fs_bitmap2, i);
|
||||
marked++;
|
||||
} else {
|
||||
/* Check that this is a block */
|
||||
message("Bad block %lu is used already in reiserfs tree. "
|
||||
"To mark it as a bad block use reiserfsck\n"
|
||||
"--fix-fixable with -B option.", i);
|
||||
|
||||
reiserfs_bitmap_clear_bit (fs->fs_badblocks_bm, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (marked) {
|
||||
reiserfs_sb_set_free(fs->fs_ondisk_sb, reiserfs_sb_get_free(fs->fs_ondisk_sb) -
|
||||
fs->fs_badblocks_bm->bm_set_bits);
|
||||
reiserfs_buffer_mkdirty(fs->fs_super_bh);
|
||||
}
|
||||
|
||||
if (Bads == 1) {
|
||||
/* fs->fs_badblocks_bm contains blocks which are not in the bad
|
||||
block list yet. Merge it with what is in the tree already. */
|
||||
reiserfs_badblock_traverse(fs, reiserfs_badblock_extract, NULL);
|
||||
}
|
||||
|
||||
if (marked) {
|
||||
reiserfs_badblock_flush(fs, 1);
|
||||
}
|
||||
|
||||
message("%lu blocks were marked as bad.", marked);
|
||||
}
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
reiserfs_filsys_t * fs;
|
||||
char * device_name;
|
||||
char * jdevice_name;
|
||||
char * j_new_device_name;
|
||||
int c;
|
||||
static int flag;
|
||||
struct reiserfs_journal_header * j_head;
|
||||
reiserfs_trans_t old, new;
|
||||
int Is_journal_or_maxtrans_size_specified = 0;
|
||||
|
||||
program_name = strrchr( argv[ 0 ], '/' );
|
||||
|
||||
if (program_name)
|
||||
program_name++;
|
||||
else
|
||||
program_name = argv[ 0 ];
|
||||
|
||||
if (argc < 2)
|
||||
print_usage_and_exit ();
|
||||
|
||||
device_name = 0;
|
||||
jdevice_name = 0;
|
||||
j_new_device_name = 0;
|
||||
|
||||
memset(UUID, 0, 16);
|
||||
|
||||
while (1) {
|
||||
static struct option options[] = {
|
||||
{"journal-device", required_argument, 0, 'j'},
|
||||
{"journal-new-device", required_argument, &flag, OPT_NEW_J},
|
||||
{"journal-new-size", required_argument, 0, 's'},
|
||||
{"trans-max-size", required_argument, 0, 't'},
|
||||
{"journal-new-offset", required_argument, 0, 'o'},
|
||||
{"no-journal-available", no_argument, &flag, OPT_SKIP_J},
|
||||
/*{"keep-old-journal-param", no_argument, 0, 'p'},*/
|
||||
{"uuid", required_argument, 0, 'u'},
|
||||
{"label", required_argument, 0, 'l'},
|
||||
{"add-badblocks", required_argument, 0, 'b'},
|
||||
{"badblocks", required_argument, 0, 'B'},
|
||||
{"force", no_argument, 0, 'f'},
|
||||
{"make-journal-standard", no_argument, &flag, OPT_STANDARD},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
int option_index;
|
||||
|
||||
c = getopt_long (argc, argv, "j:s:t:o:fu:l:b:B:V",
|
||||
options, &option_index);
|
||||
if (c == -1)
|
||||
break;
|
||||
|
||||
switch (c) {
|
||||
case 0:
|
||||
/* long-only optins */
|
||||
if (flag == OPT_NEW_J) {
|
||||
Options |= OPT_NEW_J;
|
||||
j_new_device_name = optarg;
|
||||
}
|
||||
if (flag == OPT_SKIP_J) {
|
||||
Options |= OPT_SKIP_J;
|
||||
}
|
||||
if (flag == OPT_STANDARD) {
|
||||
Options |=OPT_STANDARD;
|
||||
}
|
||||
break;
|
||||
case 'j': /* --journal-device */
|
||||
jdevice_name = optarg;
|
||||
break;
|
||||
|
||||
case 's': /* --journal-new-size */
|
||||
set_journal_device_size (optarg);
|
||||
Is_journal_or_maxtrans_size_specified = 1;
|
||||
break;
|
||||
|
||||
case 't': /* --trans-max-size */
|
||||
set_transaction_max_size (optarg);
|
||||
Is_journal_or_maxtrans_size_specified = 1;
|
||||
break;
|
||||
|
||||
case 'o': /* --offset */
|
||||
set_offset_in_journal_device (optarg);
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
/* forces replacing standard journal with non-standard
|
||||
one. Specified more than once - allows to avoid asking for
|
||||
confirmation */
|
||||
Force ++;
|
||||
break;
|
||||
case 'b': /* --add-badblocks */
|
||||
badblocks_file = optarg;
|
||||
Bads = 1;
|
||||
break;
|
||||
case 'B': /* --badblocks */
|
||||
badblocks_file = optarg;
|
||||
Bads = 2;
|
||||
break;
|
||||
case 'u':
|
||||
/* UUID */
|
||||
#if defined(HAVE_LIBUUID) && defined(HAVE_UUID_UUID_H)
|
||||
if (!strcmp(optarg, "random")) {
|
||||
uuid_generate(UUID);
|
||||
} else {
|
||||
if (uuid_parse(optarg, UUID) < 0) {
|
||||
message ("Invalid UUID '%s' was specified\n", optarg);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
#else
|
||||
message ("Cannot set the UUID, uuidlib was not found "
|
||||
"by configure.\n");
|
||||
return 1;
|
||||
#endif
|
||||
break;
|
||||
case 'l':
|
||||
/* LABEL */
|
||||
LABEL = optarg;
|
||||
break;
|
||||
case 'V':
|
||||
util_print_banner("reiserfstune");
|
||||
exit(0);
|
||||
#if 0
|
||||
case 'J': /* --journal-new-device */
|
||||
Options |= OPT_NEW_J;
|
||||
j_new_device_name = optarg;
|
||||
break;
|
||||
|
||||
case 'u': /* --no-journal-available */
|
||||
Options |= OPT_SKIPJ;
|
||||
break;
|
||||
|
||||
case 'p': /* --keep-old-journal-param */
|
||||
Options |= OPT_KEEPO;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
print_usage_and_exit();
|
||||
}
|
||||
}
|
||||
|
||||
if (optind != argc - 1)
|
||||
print_usage_and_exit ();
|
||||
|
||||
/* device to be formatted */
|
||||
device_name = argv [optind];
|
||||
|
||||
fs = reiserfs_fs_open (device_name, O_RDONLY, 0, NULL, 1);
|
||||
if (fs == NULL) {
|
||||
message ("Cannot open reiserfs on %s", device_name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* journal was opened or it wasn't opened but the option
|
||||
--no-journal-available has been specified by user */
|
||||
|
||||
/* make sure filesystem is not mounted */
|
||||
if (util_device_mounted(fs->fs_file_name) > 0) {
|
||||
/* fixme: it can not be mounted, btw */
|
||||
message ("Reiserfstune is not allowed to be run on mounted filesystem.");
|
||||
reiserfs_fs_close (fs);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!reiserfs_sb_state_ok (fs)) {
|
||||
message ("Filesystem looks not cleanly umounted, check the consistency first.\n");
|
||||
reiserfs_fs_close (fs);
|
||||
return 1;
|
||||
}
|
||||
|
||||
reiserfs_fs_reopen (fs, O_RDWR);
|
||||
|
||||
if (badblocks_file) {
|
||||
add_badblocks(fs);
|
||||
|
||||
reiserfs_fs_close(fs);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (!jdevice_name && !(Options & OPT_SKIP_J)) {
|
||||
message ("Journal device has not been specified. Assuming journal is on the main "
|
||||
"device (%s).\n", device_name);
|
||||
jdevice_name = device_name;
|
||||
}
|
||||
|
||||
if (jdevice_name && (Options & OPT_SKIP_J)) {
|
||||
message ("Either specify journal device, "
|
||||
"or choose the option --no-journal-available");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (j_new_device_name && (Options & OPT_STANDARD)) {
|
||||
/* New device was specified and --make-journal-standard was also. */
|
||||
message ("Either specify new journal device, "
|
||||
"or choose the option --make-journal-standard");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* now we try to open journal, it makes sence if there is no the flag
|
||||
NEED_TUNE in ondisk superblock and --no-journal available is not
|
||||
specified. */
|
||||
if (reiserfs_jp_get_magic(reiserfs_sb_jp(fs->fs_ondisk_sb)) != NEED_TUNE &&
|
||||
!(Options & OPT_SKIP_J))
|
||||
{
|
||||
if (reiserfs_journal_open (fs, jdevice_name, O_RDWR
|
||||
#if defined(O_LARGEFILE)
|
||||
| O_LARGEFILE
|
||||
#endif
|
||||
))
|
||||
{
|
||||
message ("Failed to open the journal device (%s).", jdevice_name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (reiserfs_journal_params_check(fs)) {
|
||||
message ("Unable to open old journal. Wrong journal parameters.");
|
||||
reiserfs_fs_close (fs);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* in spite of journal was opened, the file system can be non-consistent or
|
||||
there are non-replayed transaction in journal,
|
||||
make sure it isn't (if there is no the flag NEED_TUNE in ondisk superblock */
|
||||
if (reiserfs_jp_get_magic(reiserfs_sb_jp(fs->fs_ondisk_sb)) != NEED_TUNE &&
|
||||
reiserfs_journal_opened (fs)) {
|
||||
j_head = (struct reiserfs_journal_header *)(fs->fs_jh_bh->b_data);
|
||||
if (reiserfs_journal_get_transactions(fs, &old, &new)) {
|
||||
if (new.trans_id != reiserfs_jh_get_flushed(j_head)) {
|
||||
message ("There are non-replayed transaction in old journal,"
|
||||
" check filesystem consistency first");
|
||||
reiserfs_fs_close (fs);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (!reiserfs_sb_state_ok (fs)) {
|
||||
message ("Check filesystem consistency first");
|
||||
reiserfs_fs_close (fs);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* set UUID and LABEL if specified */
|
||||
if (fs->fs_format == REISERFS_FORMAT_3_6) {
|
||||
#if defined(HAVE_LIBUUID) && defined(HAVE_UUID_UUID_H)
|
||||
if (!uuid_is_null(UUID)) {
|
||||
memcpy (fs->fs_ondisk_sb->s_uuid, UUID, 16);
|
||||
reiserfs_buffer_mkdirty (fs->fs_super_bh);
|
||||
fs->fs_dirt = 1;
|
||||
}
|
||||
#endif
|
||||
if (LABEL != NULL) {
|
||||
if (strlen (LABEL) > 16)
|
||||
message ("Specified LABEL is longer then 16 characters, will be truncated\n");
|
||||
strncpy ((char *)fs->fs_ondisk_sb->s_label, LABEL, 16);
|
||||
reiserfs_buffer_mkdirty (fs->fs_super_bh);
|
||||
fs->fs_dirt = 1;
|
||||
}
|
||||
} else {
|
||||
#if defined(HAVE_LIBUUID) && defined(HAVE_UUID_UUID_H)
|
||||
if (!uuid_is_null(UUID))
|
||||
reiserfs_exit (1, "UUID cannot be specified for 3.5 format\n");
|
||||
#endif
|
||||
if (LABEL)
|
||||
reiserfs_exit (1, "LABEL cannot be specified for 3.5 format\n");
|
||||
}
|
||||
|
||||
if (!j_new_device_name) {
|
||||
|
||||
/* new journal device hasn't been specified */
|
||||
printf ("Current parameters:\n");
|
||||
reiserfs_super_print_state (stdout, fs);
|
||||
reiserfs_node_print (stdout, fs, fs->fs_super_bh);
|
||||
|
||||
if ((Options & OPT_STANDARD)
|
||||
&& should_make_journal_standard(fs, j_new_device_name))
|
||||
{
|
||||
if (!util_user_confirmed (stderr, "ATTENTION! Filesystem with "
|
||||
"non-standard journal found. Continue? (y/n):", "y\n"))
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
||||
fs->fs_journal_dev = fs->fs_dev;
|
||||
if (set_standard_journal_params (fs)) {
|
||||
printf ("\nNew parameters:\n");
|
||||
reiserfs_super_print_state (stdout, fs);
|
||||
reiserfs_node_print (stdout, fs, fs->fs_super_bh);
|
||||
printf ("New journal parameters:\n");
|
||||
reiserfs_journal_print_params (stdout, reiserfs_sb_jp (fs->fs_ondisk_sb));
|
||||
reiserfs_buffer_mkdirty (fs->fs_super_bh);
|
||||
reiserfs_buffer_mkuptodate (fs->fs_super_bh, 1);
|
||||
reiserfs_fs_close (fs);
|
||||
printf ("Syncing.."); fflush (stdout);
|
||||
sync ();
|
||||
printf ("ok\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (Is_journal_or_maxtrans_size_specified) {
|
||||
/* new journal device hasn't been specified, but
|
||||
journal size or max transaction size have been, so we suppose
|
||||
that journal device remains the same */
|
||||
if (!reiserfs_journal_opened (fs)) {
|
||||
message("Cannot set up new paramenters for not specified journal.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
j_new_device_name = jdevice_name;
|
||||
} else {
|
||||
/* the only parameter has been specified is device_name, so
|
||||
there is nothing to do */
|
||||
reiserfs_fs_close (fs);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* new journal device has been specified */
|
||||
/* make sure new journal device is block device file */
|
||||
if (!util_device_formatable (j_new_device_name, Force)) {
|
||||
reiserfs_fs_close (fs);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!strcmp (device_name, j_new_device_name)) {
|
||||
unsigned long reserved, journal_size;
|
||||
/* we have to put journal on main device. It is only possible if there
|
||||
is enough space reserved by mkreiserfs */
|
||||
|
||||
if (!reiserfs_super_jr_magic (fs->fs_ondisk_sb))
|
||||
/* standard journal */
|
||||
reserved = reiserfs_jp_get_size(reiserfs_sb_jp(fs->fs_ondisk_sb)) + 1;
|
||||
else
|
||||
/* non-standard journal */
|
||||
reserved = reiserfs_sb_get_reserved (fs->fs_ondisk_sb);
|
||||
|
||||
journal_size = Journal_size;
|
||||
|
||||
if (!journal_size) {
|
||||
journal_size = reiserfs_journal_default(fs->fs_super_bh->b_blocknr, fs->fs_blocksize) + 1;
|
||||
message("Journal size has not been specified. Assuming it is the default size (%lu)",
|
||||
journal_size);
|
||||
}
|
||||
|
||||
if (journal_size + Offset > reiserfs_journal_start_must (fs) + reserved) {
|
||||
message ("There is no enough space reserved for journal on main "
|
||||
"device (journal_size=%lu, reserved=%lu)\n", journal_size,
|
||||
reserved);
|
||||
reiserfs_fs_close (fs);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
message ("Current journal parameters:");
|
||||
reiserfs_journal_print_params (stdout, reiserfs_sb_jp (fs->fs_ondisk_sb));
|
||||
|
||||
if (!reiserfs_super_jr_magic (fs->fs_ondisk_sb)) {
|
||||
/* we have standard journal, so check if we can convert it
|
||||
to non-standard one */
|
||||
|
||||
/*
|
||||
if (!should_make_journal_non_standard (Force)) {
|
||||
reiserfs_fs_close (fs);
|
||||
return 1;
|
||||
}
|
||||
*/
|
||||
|
||||
if (reiserfs_super_36_magic (fs->fs_ondisk_sb))
|
||||
reiserfs_sb_set_version (fs->fs_ondisk_sb, REISERFS_FORMAT_3_6);
|
||||
else if (reiserfs_super_35_magic (fs->fs_ondisk_sb))
|
||||
reiserfs_sb_set_version (fs->fs_ondisk_sb, REISERFS_FORMAT_3_5);
|
||||
else {
|
||||
message ("Could not convert from unknown version, try reiserfsck first");
|
||||
reiserfs_fs_close (fs);
|
||||
return 1;
|
||||
}
|
||||
|
||||
memcpy (fs->fs_ondisk_sb->s_v1.s_magic, REISERFS_JR_SUPER_MAGIC_STRING,
|
||||
strlen (REISERFS_JR_SUPER_MAGIC_STRING));
|
||||
reiserfs_sb_set_reserved (fs->fs_ondisk_sb,
|
||||
reiserfs_jp_get_size (reiserfs_sb_jp(fs->fs_ondisk_sb)) + 1);
|
||||
}
|
||||
|
||||
/* now we are going to close old journal and to create a new one */
|
||||
reiserfs_journal_close (fs);
|
||||
|
||||
if (!reiserfs_journal_create (fs, j_new_device_name, Offset,
|
||||
Journal_size, Max_trans_size)) {
|
||||
message ("Could not create new journal");
|
||||
reiserfs_fs_close (fs);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (should_make_journal_standard (fs, j_new_device_name))
|
||||
set_standard_journal_params (fs);
|
||||
|
||||
message ("New journal parameters:");
|
||||
reiserfs_journal_print_params (stdout, reiserfs_sb_jp (fs->fs_ondisk_sb));
|
||||
|
||||
reiserfs_node_print (stdout, fs, fs->fs_super_bh);
|
||||
|
||||
if (Force < 2) {
|
||||
message ("ATTENTION: YOU ARE ABOUT TO SETUP THE NEW JOURNAL FOR THE \"%s\"!\n"
|
||||
"AREA OF \"%s\" DEDICATED FOR JOURNAL WILL BE ZEROED!",
|
||||
device_name, j_new_device_name);
|
||||
|
||||
if (!util_user_confirmed (stderr, "Continue (y/n):", "y\n")) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
zero_journal (fs);
|
||||
reiserfs_fs_close (fs);
|
||||
|
||||
printf ("Syncing.."); fflush (stdout);
|
||||
sync ();
|
||||
printf ("ok\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright 2002-2004 by Hans Reiser, licensing governed by
|
||||
* reiserfsprogs/README
|
||||
*/
|
||||
|
||||
#include "reiserfs/libreiserfs.h"
|
||||
|
||||
#if 0
|
||||
#include "io.h"
|
||||
#include "misc.h"
|
||||
#include "reiserfs_lib.h"
|
||||
|
||||
#include "../version.h"
|
||||
|
||||
#endif
|
||||
#if defined(HAVE_LIBUUID) && defined(HAVE_UUID_UUID_H)
|
||||
# include <uuid/uuid.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* options
|
||||
*/
|
||||
#define OPT_SUPER_FORCE 0x0010
|
||||
#define OPT_OLD_J 0x0100
|
||||
#define OPT_NEW_J 0x0200
|
||||
#define OPT_SIZEJ 0x0400
|
||||
#define OPT_TMAXS 0x0800
|
||||
#define OPT_OFSET 0x1000
|
||||
#define OPT_SKIP_J 0x2000
|
||||
#define OPT_KEEPO 0x4000
|
||||
#define OPT_FORCE 0x8000
|
||||
#define OPT_STANDARD 0x0020
|
||||
@@ -0,0 +1,161 @@
|
||||
.\" -*- nroff -*-
|
||||
.\" Copyright 1996-2004 Hans Reiser.
|
||||
.\"
|
||||
.TH tunefs.reiserfs 8 "February 2004" "Reiserfsprogs-3.6.19"
|
||||
.SH NAME
|
||||
tune.reiserfs \- The tuning tool for the ReiserFS filesystem.
|
||||
.SH SYNOPSIS
|
||||
.B tune.reiserfs
|
||||
[ \fB-f\fR ]
|
||||
[ \fB-j\fR | \fB--journal-device\fR \fIFILE\fR ]
|
||||
[ \fB--no-journal-available\fR ]
|
||||
[ \fB--journal-new-device\fR \fIFILE\fR ] [ \fB--make-journal-standard\fR ]
|
||||
[ \fB-s\fR | \fB--journal-new-size\fR \fIN\fR ]
|
||||
[ \fB-o\fR | \fB--journal-new-offset\fR \fIN\fR ]
|
||||
[ \fB-t\fR | \fB--max-transaction-size\fR \fIN\fR ]
|
||||
[ \fB-b\fR | \fB--add-badblocks\fR \fIfile\fR ]
|
||||
[ \fB-B\fR | \fB--badblocks\fR \fIfile\fR ]
|
||||
[ \fB-u\fR | \fB--uuid \fIUUID\fR ]
|
||||
[ \fB-l\fR | \fB--label \fILABEL\fR ]
|
||||
.I device
|
||||
.SH DESCRIPTION
|
||||
\fBtune.reiserfs\fR is used for tuning the ReiserFS. It can change two journal
|
||||
parameters (the journal size and the maximum transaction size), and it can move
|
||||
the journal's location to a new specified block device. (The old ReiserFS's
|
||||
journal may be kept unused, or discarded at the user's option.) Besides that
|
||||
\fBtune.reiserfs\fR can store the bad block list to the ReiserFS and set UUID
|
||||
and LABEL.
|
||||
Note: At the time of writing the relocated journal was implemented for a special
|
||||
release of ReiserFS, and was not expected to be put into the mainstream kernel
|
||||
until approximately Linux 2.5. This means that if you have the stock kernel you
|
||||
must apply a special patch. Without this patch the kernel will refuse to mount
|
||||
the newly modified file system. We will charge $25 to explain this to you if
|
||||
you ask us why it doesn't work.
|
||||
.PP
|
||||
Perhaps the most interesting application of this code is to put the
|
||||
journal on a solid state disk.
|
||||
.TP
|
||||
\fIdevice
|
||||
is the special file corresponding to the newly specified block device (e.g
|
||||
/dev/hdXX for IDE disk partition or /dev/sdXX for the SCSI disk partition).
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB-j\fR | \fB--journal-device\fR \fIFILE
|
||||
\fIFILE\fR is the file name of the block device the file system has
|
||||
the current journal (the one prior to running tune.reiserfs) on. This option is required when the journal is
|
||||
already on a separate device from the main data device (although it
|
||||
can be avoided with \fB--no-journal-available\fR). If you don't
|
||||
specify journal device by this option, tune.reiserfs suppose that
|
||||
journal is on main device.
|
||||
.TP
|
||||
\fB--no-journal-available
|
||||
allows \fBtune.reiserfs\fR to continue when the current journal's block
|
||||
device is no longer available. This might happen if a disk goes bad
|
||||
and you remove it (and run fsck).
|
||||
.TP
|
||||
\fB--journal-new-device \fIFILE
|
||||
\fIFILE\fR is the file name of the block device which will contain the
|
||||
new journal for the file system. If you don't specify this,
|
||||
tune.reiserfs supposes that journal device remains the same.
|
||||
.TP
|
||||
\fB \-s\fR | \fB\--journal-new-size \fIN
|
||||
\fIN\fR is the size parameter for the new journal. When journal is to
|
||||
be on a separate device - its size defaults to number of blocks that
|
||||
device has. When journal is to be on the same device as the filesytem - its size defaults
|
||||
to amount of blocks allocated for journal by \fImkfs.reiserfs\fR when it
|
||||
created the filesystem. Minimum is 513 for
|
||||
both cases.
|
||||
.TP
|
||||
\fB \-o\fR | \fB\--journal-new-offset \fIN
|
||||
\fIN\fR is an offset in blocks where journal will starts from when journal is to
|
||||
be on a separate device. Default is 0. Has no effect when journal is
|
||||
to be on the same device as the filesystem. Most users have no need
|
||||
to use this feature. It can be used when you want the journals from
|
||||
multiple filesystems to reside on the same device, and you don't want
|
||||
to or cannot partition that device.
|
||||
.TP
|
||||
\fB \-t\fR | \fB\--maximal-transaction-size \fIN
|
||||
\fIN\fR is the maximum transaction size parameter for the new
|
||||
journal. The default, and max possible, value is 1024 blocks. It
|
||||
should be less than half the size of the journal. If specifed
|
||||
incorrectly, it will be adjusted.
|
||||
.TP
|
||||
\fB \-b\fR | \fB\--add-badblocks\fR \fIfile\fR
|
||||
\fIFile\fR is the file name of the file that contains the list of blocks to be marked
|
||||
as bad on the fs. The list is added to the fs list of bad blocks.
|
||||
.TP
|
||||
\fB \-B\fR | \fB\--badblocks\fR \fIfile\fR
|
||||
\fIFile\fR is the file name of the file that contains the list of blocks to be marked
|
||||
as bad on the fs. The bad block list on the fs is cleared before the list specified
|
||||
in the \fIFile\fR is added to the fs.
|
||||
.TP
|
||||
\fB\-f\fR | \fB--force\fR
|
||||
Normally \fBtune.reiserfs\fR will refuse to change a journal of a
|
||||
file system that was created before this journal relocation code. This
|
||||
is because if you change the journal, you cannot go back (without special
|
||||
option \fB--make-journal-standard\fR) to an old kernel that lacks this feature and be able to use your filesytem. This option forces it to do that. Specified more
|
||||
than once it allows to avoid asking for confirmation.
|
||||
.TP
|
||||
\fB--make-journal-standard\fR
|
||||
As it was mentioned above, if your file system has non-standard journal,
|
||||
it can not be mounted on the kernel without journal relocation
|
||||
code. The thing can be changed, the only condition is that there is reserved
|
||||
area on main device of the standard journal size 8193 blocks (it will be so for
|
||||
instance if you convert standard journal to non-standard). Just
|
||||
specify this option when you relocate journal back, or without relocation
|
||||
if you already have it on main device.
|
||||
.TP
|
||||
\fB-u\fR | \fB--uuid \fIUUID\fR
|
||||
Set the universally unique identifier (\fB UUID \fR) of the filesystem to
|
||||
\fIUUID\fR (see also \fBuuidgen(8)\fR). The format of the UUID is a
|
||||
series of hex digits separated by hypthens, like this:
|
||||
"c1b9d5a2-f162-11cf-9ece-0020afc76f16".
|
||||
.TP
|
||||
\fB-l\fR | \fB--label \fILABEL\fR
|
||||
Set the volume label of the filesystem. \fILABEL\fR can be at most 16
|
||||
characters long; if it is longer than 16 characters, tune.reiserfs will truncate it.
|
||||
.SH POSSIBLE SCENARIOS OF USING REISERFSTUNE:
|
||||
1. You have ReiserFS on /dev/hda1, and you wish to have
|
||||
it working with its journal on the device /dev/journal
|
||||
.nf
|
||||
.IP
|
||||
boot kernel patched with special "relocatable journal support" patch
|
||||
tune.reiserfs /dev/hda1 --journal-new-device /dev/journal -f
|
||||
mount /dev/hda1 and use.
|
||||
You would like to change max transaction size to 512 blocks
|
||||
tune.reiserfs -t 512 /dev/hda1
|
||||
You would like to use your file system on another kernel that doesn't
|
||||
contain relocatable journal support.
|
||||
umount /dev/hda1
|
||||
tune.reiserfs /dev/hda1 -j /dev/journal --journal-new-device /dev/hda1 --make-journal-standard
|
||||
mount /dev/hda1 and use.
|
||||
.LP
|
||||
2. You would like to have ReiserFS on /dev/hda1 and to be able to
|
||||
switch between different journals including journal located on the
|
||||
device containing the filesystem.
|
||||
.nf
|
||||
.IP
|
||||
boot kernel patched with special "relocatable journal support" patch
|
||||
mkfs.reiserfs /dev/hda1
|
||||
you got solid state disk (perhaps /dev/sda, they typically look like scsi disks)
|
||||
tune.reiserfs --journal-new-device /dev/sda1 -f /dev/hda1
|
||||
Your scsi device dies, it is three in the morning, you have an extra IDE device
|
||||
lying around
|
||||
fsck.reiserfs --no-journal-available /dev/hda1
|
||||
or
|
||||
fsck.reiserfs --rebuild-tree --no-journal-available /dev/hda1
|
||||
tune.reiserfs --no-journal-available --journal-new-device /dev/hda1 /dev/hda1
|
||||
using /dev/hda1 under patched kernel
|
||||
.SH AUTHOR
|
||||
This version of \fBtune.reiserfs\fR has been written by Vladimir
|
||||
Demidov <vova@namesys.com> and Edward Shishkin <edward@namesys.com>.
|
||||
.SH BUGS
|
||||
Please report bugs to the ReiserFS developers <reiserfs-dev@namesys.com>, providing
|
||||
as much information as possible--your hardware, kernel, patches, settings, all printed
|
||||
messages; check the syslog file for any related information.
|
||||
.SH SEE ALSO
|
||||
.BR fsck.reiserfs (8),
|
||||
.BR debugfs.reiserfs (8),
|
||||
.BR mkfs.reiserfs (8)
|
||||
|
||||
|
||||
Reference in new issue
Block a user