Skip to content

Commit

Permalink
Add parallel restore
Browse files Browse the repository at this point in the history
Signed-off-by: Zach Brown <[email protected]>
Signed-off-by: Hunter Shaffer <[email protected]>
Signed-off-by: Auke Kok <[email protected]>
  • Loading branch information
zabbo authored and aversecat committed Feb 10, 2025
1 parent ee30367 commit 2f4c512
Show file tree
Hide file tree
Showing 4 changed files with 2,113 additions and 1 deletion.
8 changes: 7 additions & 1 deletion utils/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ OBJ_DIRS := src src/check
OBJ := $(foreach dir,$(OBJ_DIRS),$(patsubst %.c,%.o,$(wildcard $(dir)/*.c)))
DEPS := $(foreach dir,$(OBJ_DIRS),$(wildcard $(dir)/*.d))

all: $(BIN)
AR := src/scoutfs_parallel_restore.a

all: $(BIN) $(AR)

ifneq ($(DEPS),)
-include $(DEPS)
Expand All @@ -37,6 +39,10 @@ $(BIN): $(OBJ)
$(QU) [BIN $@]
$(VE)gcc -o $@ $^ -luuid -lm -lcrypto -lblkid

$(AR): $(OBJ)
$(QU) [AR $@]
$(VE)ar rcs $@ $^

%.o %.d: %.c Makefile sparse.sh
$(QU) [CC $<]
$(VE)gcc $(CFLAGS) -MD -MP -MF $*.d -c $< -o $*.o
Expand Down
3 changes: 3 additions & 0 deletions utils/scoutfs-utils.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ cp man/*.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/.
install -m 755 -D src/scoutfs $RPM_BUILD_ROOT%{_sbindir}/scoutfs
install -m 644 -D src/ioctl.h $RPM_BUILD_ROOT%{_includedir}/scoutfs/ioctl.h
install -m 644 -D src/format.h $RPM_BUILD_ROOT%{_includedir}/scoutfs/format.h
install -m 644 -D src/parallel_restore.h $RPM_BUILD_ROOT%{_includedir}/scoutfs/parallel_restore.h
install -m 644 -D src/scoutfs_parallel_restore.a $RPM_BUILD_ROOT%{_libdir}/scoutfs/libscoutfs_parallel_restore.a
install -m 755 -D fenced/scoutfs-fenced $RPM_BUILD_ROOT%{_libexecdir}/scoutfs-fenced/scoutfs-fenced
install -m 644 -D fenced/scoutfs-fenced.service $RPM_BUILD_ROOT%{_unitdir}/scoutfs-fenced.service
install -m 644 -D fenced/scoutfs-fenced.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/scoutfs/scoutfs-fenced.conf.example
Expand All @@ -70,6 +72,7 @@ install -m 644 -D fenced/scoutfs-fenced.conf.example $RPM_BUILD_ROOT%{_sysconfdi
%files -n scoutfs-devel
%defattr(644,root,root,755)
%{_includedir}/scoutfs
%{_libdir}/scoutfs

%clean
rm -rf %{buildroot}
Expand Down
Loading

0 comments on commit 2f4c512

Please sign in to comment.