Import Debian changes 12.4-1
snapraid (12.4-1) unstable; urgency=medium . * New upstream version 12.4 . snapraid (12.3-1) unstable; urgency=medium . * New upstream version 12.3 . snapraid (12.2-1) unstable; urgency=medium . * New upstream version 12.2 . snapraid (12.1-1) unstable; urgency=medium . * New upstream version 12.1 . snapraid (12.0-1) unstable; urgency=medium . [ Debian Janitor ] * Trim trailing whitespace. * Set upstream metadata fields: Repository, Repository-Browse. . [ Mo Zhou ] * New upstream version 12.0 (Closes: #995324)
This commit is contained in:
commit
153663d8b6
52
.circleci/config.yml
Normal file
52
.circleci/config.yml
Normal file
@ -0,0 +1,52 @@
|
||||
# Build configuration for https://circleci.com/
|
||||
|
||||
version: 2.1
|
||||
|
||||
orbs:
|
||||
win: circleci/windows@2.2.0
|
||||
|
||||
workflows:
|
||||
main:
|
||||
jobs:
|
||||
- build_ubuntu
|
||||
- build_docker
|
||||
|
||||
jobs:
|
||||
build_docker:
|
||||
docker:
|
||||
- image: circleci/buildpack-deps:stable
|
||||
steps:
|
||||
- checkout
|
||||
- run: autoreconf -i && ./configure --enable-warning-as-error && make all dist
|
||||
build_ubuntu:
|
||||
machine:
|
||||
image: ubuntu-2004:202101-01
|
||||
steps:
|
||||
- checkout
|
||||
- run: autoreconf -i && ./configure --enable-warning-as-error && make all dist
|
||||
build_win:
|
||||
executor:
|
||||
name: win/default
|
||||
steps:
|
||||
- run:
|
||||
name: Installing MSYS2
|
||||
shell: powershell.exe
|
||||
command: 'choco install msys2'
|
||||
- run:
|
||||
name: Installing tools
|
||||
shell: powershell.exe
|
||||
command: 'C:\tools\msys64\usr\bin\bash.exe -l -c "pacman --needed --noconfirm -S autoreconf automake mingw-w64-x86_64-toolchain"'
|
||||
- checkout
|
||||
- run:
|
||||
name: Autoreconf
|
||||
shell: C:\\tools\\msys64\\usr\\bin\\bash.exe -l
|
||||
command: 'cd /c/Users/circleci/project && autoreconf -i'
|
||||
- run:
|
||||
name: Configure
|
||||
shell: C:\\tools\\msys64\\usr\\bin\\bash.exe -l
|
||||
command: 'cd /c/Users/circleci/project && ./configure --enable-warning-as-error'
|
||||
- run:
|
||||
name: Make
|
||||
shell: C:\\tools\\msys64\\usr\\bin\\bash.exe -l
|
||||
command: 'cd /c/Users/circleci/project && make'
|
||||
|
17
.drone.yml
Normal file
17
.drone.yml
Normal file
@ -0,0 +1,17 @@
|
||||
# Build configuration for https://www.tea-ci.org
|
||||
|
||||
build:
|
||||
image: teaci/msys$$arch
|
||||
shell: mingw$$arch
|
||||
pull: true
|
||||
commands:
|
||||
- autoreconf -i
|
||||
- ./configure --enable-warning-as-error
|
||||
- make
|
||||
- make check
|
||||
|
||||
matrix:
|
||||
arch:
|
||||
- 64
|
||||
- 32
|
||||
|
43
.github/workflows/build.yml
vendored
Normal file
43
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build-mac:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: brew install automake
|
||||
- run: autoreconf -i
|
||||
- run: ./configure --enable-warning-as-error
|
||||
- run: make all
|
||||
- run: make distcheck
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: autoreconf -i
|
||||
- run: ./configure --enable-warning-as-error
|
||||
- run: make all
|
||||
- run: make distcheck
|
||||
build-win:
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: true
|
||||
install: mingw-w64-x86_64-gcc autoconf automake make
|
||||
- run: autoreconf -i
|
||||
- run: ./configure --enable-warning-as-error
|
||||
- run: make all
|
||||
- run: make distcheck
|
||||
|
71
.github/workflows/codeql-analysis.yml
vendored
Normal file
71
.github/workflows/codeql-analysis.yml
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '20 6 * * 0'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'cpp' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||
# Learn more:
|
||||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
69
.gitignore
vendored
Normal file
69
.gitignore
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
# archives
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.tgz
|
||||
|
||||
# backups
|
||||
*~
|
||||
|
||||
# logs
|
||||
*.log
|
||||
stream*.bin
|
||||
|
||||
# upload
|
||||
makepush.sh
|
||||
makemount.sh
|
||||
makeumount.sh
|
||||
|
||||
# autotools
|
||||
Makefile
|
||||
Makefile.in
|
||||
compile
|
||||
aclocal.m4
|
||||
autom4te.cache/
|
||||
config.guess
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
install-sh
|
||||
missing
|
||||
stamp-h1
|
||||
.dirstamp
|
||||
|
||||
# objects
|
||||
snapraid
|
||||
mktest
|
||||
mkstream
|
||||
*.exe
|
||||
*.o
|
||||
*.gcda
|
||||
*.gcno
|
||||
*.gcov
|
||||
|
||||
# projects
|
||||
*.dst
|
||||
*.epr
|
||||
*.geany
|
||||
|
||||
# AFL
|
||||
makeafl.sh
|
||||
afl/
|
||||
afl_corpus/
|
||||
|
||||
# specific
|
||||
cov/
|
||||
contrib/
|
||||
paper/
|
||||
kernel/
|
||||
obj/
|
||||
bench/
|
||||
support/
|
||||
archive/
|
||||
www/
|
||||
wiki/
|
||||
beta/
|
||||
ftp/
|
||||
|
151
CHECKSUMS
Normal file
151
CHECKSUMS
Normal file
@ -0,0 +1,151 @@
|
||||
sha256
|
||||
761eaf08937139a89d79d1ffbad42508f270d3aa603eac50475f7449ae278dcf snapraid-1.2.tar.gz
|
||||
10e64f2629eb469a32eabc84e1f9a59593cbbf61282ead964b622af1ec0c4681 snapraid-1.2-windows-x64.zip
|
||||
27da3c54fe408ab53c6e2b4b398ae46328a2dbc701b785a55bf76ffed6046eb2 snapraid-1.2-windows-x86.zip
|
||||
2e6aaa660a5a74665044ead40959006632dcd1ee1e21091e6260f5b845304f96 snapraid-1.3.tar.gz
|
||||
0d0cefeabf8230b66414a8731ceb52a0adaaedb5be0fa11d07a6be44e9f2fb6d snapraid-1.3-windows-x64.zip
|
||||
4358802fb022ba5e2f8d1323ce963155adccea99069abd5f901eadf1411b6366 snapraid-1.3-windows-x86.zip
|
||||
157b0ca7cfa9cba43cf995b4c32b0b206e299f5ffff58062069bb6ec41c77c0d snapraid-1.4.tar.gz
|
||||
5b210dd4667369799fd02757e8efc4d733c704cfe72319d297d4ab969b80c962 snapraid-1.4-windows-x64.zip
|
||||
77047e1fa1bfcb12db7d5c3167e7dbbbb1718909f1003fd185cdf219cd952427 snapraid-1.4-windows-x86.zip
|
||||
f460bf9aee4b02b6c08f19b0caa2928b075c73ca4cfc41c7f426f015f67cffbc snapraid-1.5.tar.gz
|
||||
d19262bdf9e572fa80285887886a8fbe9a7b9bd4159496f112d383bf9b4db797 snapraid-1.5-windows-x64.zip
|
||||
28816c0cde4cf8ce8e91a585eb9aab5552344a331237b6a2afd50396685814fd snapraid-1.5-windows-x86.zip
|
||||
e0684d036cfd6b9fcdf23792c057fec4f4531d25aab7c677ff35e7a8be07b098 snapraid-1.6.tar.gz
|
||||
9c13f99d67aafe43f5c540d97d0f6b40289856f547b8f33ee8aee27b270a7fae snapraid-1.6-windows-x64.zip
|
||||
ae94db99a06068e17134ce69009492c4bfd8f6e54ea1848df105bb89f9f7ba28 snapraid-1.6-windows-x86.zip
|
||||
1cf7a8f58533d6bc717ff6d396114ec4ed61eb66ff2756370e4cc730ee4edc4d snapraid-1.7.tar.gz
|
||||
0cb49c676f3f9fd1f0fc938513b6dcaaf15390b64098e17cff5066667e4d01d5 snapraid-1.7-windows-x64.zip
|
||||
44bc6b947ba845a89ecf812b82e751dca2dd4a6143ff06391c3b8b285a7ed3a2 snapraid-1.7-windows-x86.zip
|
||||
da1c09f0139e683c03942c2b9489c2d9b989c59d147f7c28258c8e58c3938037 snapraid-1.8.tar.gz
|
||||
fca7352fece5d7243af45ba8c5a07e08cc0e24d226468a619b9d86a3767e7099 snapraid-1.8-windows-x64.zip
|
||||
35520cab33b3b3f9efc4ba4d7a968a7d7d49637b5e256921e0091424f5dd60ee snapraid-1.8-windows-x86.zip
|
||||
504c3fe288b66c84bc65173979e7cede06370ca2a5f02ef3ca200c2fc8b09ea9 snapraid-1.9.tar.gz
|
||||
ddba596451a05c61b20ce1e82c8039ba3c13be67b7469f2c75c6b0b7b4b18356 snapraid-1.9-windows-x64.zip
|
||||
5a0dd3cdc0edf69cd03d926b594e41f5ca7e07564ef1cb3d6ac417c76f16b77b snapraid-1.9-windows-x86.zip
|
||||
5e4eee49748faf966ebcc1cb3b9127ad7047542baf8952c6e0a9cbb32dac4d88 snapraid-1.10.tar.gz
|
||||
7812a37f8767beb9542def762b2e131caafffc1b1b21f1d9422030e93e367f12 snapraid-1.10-windows-x64.zip
|
||||
b899784498050c5d41752464bd31cec7de9e77ec865f55e2192fea75f52787d5 snapraid-1.10-windows-x86.zip
|
||||
c349c4c25e3cb794d908dc75422ca9b04b44162c295b41d4ea55081af1a3451f snapraid-1.11.tar.gz
|
||||
47e8f09f3d012d0a34d71e6ece7b9171c82af27766cca709fc9bbd104328cc7d snapraid-1.11-windows-x64.zip
|
||||
8a8b0562192732022ae1732f5ae48e5f8745e217f73683123b2822e316918204 snapraid-1.11-windows-x86.zip
|
||||
bd89ef0ddc3909c50fecc30da1d5d70342b92952b5d3ae0a2e31a66c8755dc8a snapraid-1.12.tar.gz
|
||||
290c5ac8667ca7ada12a0d550e06c9fbc5f4e29abb5af0ef105eba38fb274c5d snapraid-1.12-windows-x64.zip
|
||||
8cbc4e447f2152c3e76025cdbad03c54e7c85e004bb535f9dc7dde9b86605fe8 snapraid-1.12-windows-x86.zip
|
||||
7c824abf6cacd8b847467916a1b4c28f48161e4b9f9b6c2f607c4de473a663c9 snapraid-1.13.tar.gz
|
||||
22f6e9bf1dff5df4abff29b7cf364dc029959991dc158257f2a283721581abf4 snapraid-1.13-windows-x64.zip
|
||||
9801b1a0331c461ce70c7824e2624dd2866358d61d923ff854253f340985947e snapraid-1.13-windows-x86.zip
|
||||
68a48c961fcc15ffcfb86e4c5ea2371d562252e61f58fe87a529f479e81fb2bb snapraid-2.0.tar.gz
|
||||
a2e1fb0610c8bfc57d73da1dbd276c238a032bf9b4c73a41977fcc57e773fff4 snapraid-2.0-windows-x64.zip
|
||||
0fc3bee4d107bcd5e55a1c5bb81015558d9791d66a44f9ae2e3723906c3199df snapraid-2.0-windows-x86.zip
|
||||
788377f579486c2b16548563a3d25f385594ae4276f1328c8f82cd0d5e0af9b6 snapraid-2.1.tar.gz
|
||||
6e32fc0603136c4d3ad60fc1f04e6c919b7e7159267750ebf0dd8ad20ee6b442 snapraid-2.1-windows-x64.zip
|
||||
d2813aec37f96506bcf98f2b5196204f065786731a5874f495f18f58fe87064b snapraid-2.1-windows-x86.zip
|
||||
faf9545f0a66865e754ad587731483becf895a954c22e023501a2f28af44682a snapraid-2.2.tar.gz
|
||||
2ea4b610c8d99f3766f6d2c89be5eafd1e16a17454d9df02d982fa184b517744 snapraid-2.2-windows-x64.zip
|
||||
e2dac0663546f06ac3e679a93ba5de9e7de91563e09c1396fd367c5b16e011be snapraid-2.2-windows-x86.zip
|
||||
68e610d67087c02715289934472c5fa3d7aa77c8085298ba54f02f26f7d396ad snapraid-3.0.tar.gz
|
||||
ca7943f270a940554ddbd8c09698228120da2bac5b6d78486a34f5b301e24f47 snapraid-3.0-windows-x64.zip
|
||||
c6a47d8bf544e69d9b301fe525d193c8faa8ef056c78f8a0649637d2e99b93c6 snapraid-3.0-windows-x86.zip
|
||||
b5b22350c221e145c3347426f186f188f5d64616d03f196b35d75db564e78f7f snapraid-3.1.tar.gz
|
||||
6d275cf3d579a5050e936879db85acbcb34b6522b36d5bc81b2f3764ca011c87 snapraid-3.1-windows-x64.zip
|
||||
66f5967e559368193aef7b13a1c641694ca62f64e4b5749a7e2709aac6dc5759 snapraid-3.1-windows-x86.zip
|
||||
99617ef379c4e46cc4366f2b3baced653f786ef08a40d74dca23a11a9240b096 snapraid-3.2.tar.gz
|
||||
94d121d8cc0b9ab7ef1648e42edbfe1cfc602231c86a086d21984177da566f77 snapraid-3.2-windows-x64.zip
|
||||
1d1ed69d3eab8247a7444e603ba09a56ec77979d3865489b2d8a7fc5db65848f snapraid-3.2-windows-x86.zip
|
||||
c5a6e77613fab5cecb1aa55750f2045934d9374ba70471b6d35296c34509e5a9 snapraid-4.0.tar.gz
|
||||
a59c911fef0d4d3e95d5521c6a180b40c455870be3ee9dbb5991b05b2cdd2f05 snapraid-4.0-windows-x64.zip
|
||||
97ec4ae7b6ec6cd05e0c2ae835def526d12c35fa3546d27bd93978d978cd62aa snapraid-4.0-windows-x86.zip
|
||||
7f5a37be7b8b78056d6602cef8ef702fe4f0d0b6ac3fa4bcefeb70743425b6fe snapraid-4.2.tar.gz
|
||||
bf7861274639f2e9e5819ec3a89eed911cd79a212824fe3a6b64e45c0d1e2cc4 snapraid-4.2-windows-x64.zip
|
||||
c7d9330be1936d7d7b07c51668fc8d3f88ce270e9e74945288d75eda2405a377 snapraid-4.2-windows-x86.zip
|
||||
09f1ebfb5c45680c50651e94287d59e58260c46aee922d8864fb06fd591740e8 snapraid-4.3.tar.gz
|
||||
ba1008452ff679c1e144206c73a81e4cb2689006c9ce37b60ceab45ef4c99dda snapraid-4.3-windows-x64.zip
|
||||
23b21e162d5d18a4f68c8635e1f111fddb91d380514d8ddab9040b18a49d9994 snapraid-4.3-windows-x86.zip
|
||||
aa22ea2e01a8db45ba43a3139d763cb2d12548de96f957a1ea1b5f80f04a4d83 snapraid-4.4.tar.gz
|
||||
ca68dd88741290a6ee6494a9186b58766cab2b838f4a55ab23921b524b15ee82 snapraid-4.4-windows-x64.zip
|
||||
3d9cccc2080d1435e7e747c7eeeffc85e0b68ad45b390c236de321b8aca44d46 snapraid-4.4-windows-x86.zip
|
||||
ba43b0534197c6064b7a171321762be2ac2c848d4849c578007cc65aa963bed5 snapraid-5.1.tar.gz
|
||||
54a31c5c979b9c3ad481cd918a48e220f11ce04de0a8ec6f41a957af7ba259fc snapraid-5.1-windows-x64.zip
|
||||
6758966b3a120bf5b97f21748f649b2f147800b10377a0ee69d922be318ee399 snapraid-5.1-windows-x86.zip
|
||||
eab07c21201eceb4204f8039f021ff0032515719aa5e640c330da45dd8b8e7a3 snapraid-5.2.tar.gz
|
||||
554cc7be40fff0a0f249522bda957dfba229066e81102624b979213666b1aaae snapraid-5.2-windows-x64.zip
|
||||
44f909157ba89d769af59e971c71b15bd38dfd62359b2e2c7eeb8cef0f9dc081 snapraid-5.2-windows-x86.zip
|
||||
81e00fced6bb040d49aa6e3dc6fda97f22bf677d00f6c0c490e312c23222b421 snapraid-5.3.tar.gz
|
||||
2627b2491b4d432a311cca1c924f4b40cef7a64c930b7e5eca55b3b9a8a62e61 snapraid-5.3-windows-x64.zip
|
||||
d1019dc29922d4787c3fd9d4222dfc3b84a6a2e0c6b2db298340747238d8fb46 snapraid-5.3-windows-x86.zip
|
||||
d836200058b98f189e576ad5619d4ffcd867e5dc8d2a4b775bff07d4f201c938 snapraid-6.0.tar.gz
|
||||
06f2e56bc30c89e4a1561ec32cf72b240765456505f17da539af4b4338a6b12c snapraid-6.0-windows-x64.zip
|
||||
6ae0a3fa973a28c64489bc28d7a7f4b354d3fc6703bcb83ef661cf76e994b34d snapraid-6.0-windows-x86.zip
|
||||
1709c09b0e0699ce38452be7340c279c561b91433a6810600386bb9d8c0491e3 snapraid-6.1.tar.gz
|
||||
40d995a88a23d799a32eba15f64c983a012771c527208cec2ad98787a45ef4c3 snapraid-6.1-windows-x64.zip
|
||||
f8e09b3300717d1f9ee9b69bb132038642839c19a15a1f47810f3de10ad559eb snapraid-6.1-windows-x86.zip
|
||||
b182328227ed9b87b01037f7d005d38a6e3cfb0f675e919978c696dcc6246787 snapraid-6.2.tar.gz
|
||||
72ccfbf6548b83bd6f229d4862763a4e4cf6001c94d9ee84bf7b2a379a9a7743 snapraid-6.2-windows-x64.zip
|
||||
55f1bc131f9148ed2b52e0e252c7155e50f5b4383fe82cd74ec2edace2ddc9c6 snapraid-6.2-windows-x86.zip
|
||||
1f1961385b865bff5282bd16aff76f372f3ed19b685ef7a3b27d907a499385d2 snapraid-6.3.tar.gz
|
||||
bb55d74d6b3cb08b21f70fded8b706ec1e790222cb265524cb2dc5499ec73391 snapraid-6.3-windows-x64.zip
|
||||
3e4fa161ea26b8472dbbbfb4e61b34aca904ff9621f5afafbc83280d334a89b2 snapraid-6.3-windows-x86.zip
|
||||
7cad74422d45c8a05435a03d3228a2d621a962fb866caedde0497f180bd9f60d snapraid-6.4.tar.gz
|
||||
59471b49733c36acfbdeb16b28fbee063c4582abab2c9168abc7abc75610f9fc snapraid-6.4-windows-x64.zip
|
||||
abe80b7c019980da2af5e07e0ea8b1ac1e1cdb2eb663483c07dab6ad6bd15985 snapraid-6.4-windows-x86.zip
|
||||
554684520204d45f8b7cee9abb0269dd2bdba272cb0130c3b26062bea551a791 snapraid-7.0.tar.gz
|
||||
a617b435f97cd746b4076d00cde68f947cca21adaca6ce603fec4676827b7ae9 snapraid-7.0-windows-x64.zip
|
||||
301af727522912184f6d4a8290757950fed4577da625d9951809ff69f50b6e4f snapraid-7.0-windows-x86.zip
|
||||
dd9005b6d7ea701e4aa0f854a0e34dabe68d7765b75f12fc6b3e1fda4d5c2cef snapraid-7.1.tar.gz
|
||||
0d3a9625a6156ffe9b9eb4703aa2fc63141c51b83c69e98fbecce5430b1980e4 snapraid-7.1-windows-x64.zip
|
||||
e0afdb753ae6a3bb3484a1bfe1cf01b9178010a8c11604e4bbc44b2f83884842 snapraid-7.1-windows-x86.zip
|
||||
a912628dd003b3d70f2736629d48eeb738e7d27cba74014001dcc46fce3bc3be snapraid-8.0.tar.gz
|
||||
9c2158fb9e2c08570f6a03f5cea7ab68d2a424adb1f42bb6b3d970ba9dc8a15d snapraid-8.0-windows-x64.zip
|
||||
3c2c4357450564010d80bbd2cb1d5583281885b32cf659a0cf3dadce4766e167 snapraid-8.0-windows-x86.zip
|
||||
6bf89a1319ac3403958cd2c98a9c6102728c0070cfa1aedd90c4561d93c54e5d snapraid-8.1.tar.gz
|
||||
83ad064d5c3938fdacb989983c6b0fafa0932c236dc4baa93512f3c97fa019bc snapraid-8.1-windows-x64.zip
|
||||
25e5cffade3667348a242f44fb23719328d578010d79bb28a5cab662fc75916b snapraid-8.1-windows-x86.zip
|
||||
dff5f4e9a41865313ddd60b6379d5c0b308880d33f197934f98313e8241c6274 snapraid-9.0.tar.gz
|
||||
624c3aa6cb0bdb7c90566545ca831721ea5e543c843418a00ff4de753af07953 snapraid-9.0-windows-x64.zip
|
||||
6ace6dafacd902bdf058e42c7d39591e327aef1bb19a94b05496f0f14aca8e1e snapraid-9.0-windows-x86.zip
|
||||
397fdd7709e941e372b37025457794f8b0ce63a5a8455703ad17770cbccd3823 snapraid-9.1.tar.gz
|
||||
4c56b2c5d556a3685239e444cb58ce84c398e86a173be34ff7cfa3a2b31a5b34 snapraid-9.1-windows-x64.zip
|
||||
515ca2078cdcb58b59afc005770a06648d8f17adb27afa5751ca6f68de2c05c6 snapraid-9.1-windows-x86.zip
|
||||
77de90645a5debd177995d7897d58277b7c778632f0d9852740f5670f3321176 snapraid-9.2.tar.gz
|
||||
483d96dc8937f6df48b7f454f8ec8f7ee51b5e973fa8f004e59048d60525d2fb snapraid-9.2-windows-x64.zip
|
||||
99c950ff31c73cc55a1b83e4dfdbb6e1717420af54721f8bbe813fbbba484e04 snapraid-9.2-windows-x86.zip
|
||||
61c4f3ce8bd5ebb1178fe76ab5933e90c4cead6dba31669f11e262d258c2b2ba snapraid-9.3.tar.gz
|
||||
178e743b6246265f936e63ab47fe2a942bf414992cd752478854b81bdf264913 snapraid-9.3-windows-x64.zip
|
||||
2cb888833cdddc82431822f818de0cfd046ceda5a7aa17bf9c410b6147ed7e20 snapraid-9.3-windows-x86.zip
|
||||
f7dcf19480256fc2c1db9ab976aa12f786e76da6044cc397f0451524e8031ad6 snapraid-10.0.tar.gz
|
||||
a3b4b2563f44f17072bb20963d61aae53d9f0e6b9446509fee76bbfa9b51fd23 snapraid-10.0-windows-x64.zip
|
||||
95a1859163beb8c8d02208b27ecf5298068972498c7e2b99b488693ad5f8f133 snapraid-10.0-windows-x86.zip
|
||||
30a72b8853ea750128c96784b73bb55f7faa4b16367b2e03f40c1f78515c5771 snapraid-11.0.tar.gz
|
||||
af6f24adb81008e7ccdb7a8f2c46d1187542bd290294563de90acf5d817d772d snapraid-11.0-windows-x64.zip
|
||||
fedc7591c8de0ce2775482e6b18033cdaca62078a0a16d45421d5fb5dd5615d6 snapraid-11.0-windows-x86.zip
|
||||
b9acafeb6cece61fd426f08362b596ba89eea0564231955b82156fd09c0e6884 snapraid-11.1.tar.gz
|
||||
6468d1a55a9a8043eae3c7c292c908c0fbd1974af3f175df23d39dd4748d9bf9 snapraid-11.1-windows-x64.zip
|
||||
e70929b44ed88701b542abbccadc57dd89469f58cf7d6ca0bf80ce706d854553 snapraid-11.1-windows-x86.zip
|
||||
735cdeb7656ac48cbb0b4a89a203dd566505071e465d5effbcc56bcb8fd3a0d7 snapraid-11.2.tar.gz
|
||||
025faabb6390b6af600034523e5988e14160015b835541d8427475ca7fa52057 snapraid-11.2-windows-x64.zip
|
||||
de16e2083054f34e1206b552bd05c64218c0dffcf787d716c6639f8728457d20 snapraid-11.2-windows-x86.zip
|
||||
d35ad92157936db3411e2cf7325665fc59e2d159204f9424895cfa9f33122af1 snapraid-11.3.tar.gz
|
||||
b764a3341783d4694242412e0fca7c112e44e84a4a89a7c27b0f74a836a84baf snapraid-11.3-windows-x64.zip
|
||||
f8e51bee80ae0223f402afe68f5192f1036434bab816c42333bf2e5f9fbc82a2 snapraid-11.3-windows-x86.zip
|
||||
1de47b8277c7dd9c339396efdd2b12a865ff82fdf6ab47cb945f2e21717451c9 snapraid-11.4.tar.gz
|
||||
0734ca7a521ba7c05eea6898f481ca812d2a2d78da4545f7990cd27e6381dc75 snapraid-11.4-windows-x64.zip
|
||||
061075df60b584ade5c76551ca54d76726441421576a544cdfd621acb23d55e1 snapraid-11.4-windows-x86.zip
|
||||
1f5267261bdbcf4d48b9359ce67184df11905590739140f740327fb73bcecafa snapraid-11.5.tar.gz
|
||||
e18f6b825a25b71947c2c41a315440a3d394de348afca80e2ab13a525bbb8a2b snapraid-11.5-windows-x64.zip
|
||||
a66753201e55c115699df78f89dd562c1b71e876aba5be35fcaf507bfe1e9e52 snapraid-11.5-windows-x86.zip
|
||||
f030a3830449a78d10af41320da0be21c60f88dc8d328ebd056e0eb7596161cf snapraid-11.6.tar.gz
|
||||
8a3b8fd240285b5abf62c3ce222a5c674b475a83b3c48a40e457d34bfbcd1744 snapraid-11.6-windows-x64.zip
|
||||
e8e9140423552cbccbe9a162100a830cd7d2e29bae0893cca9f5bd1943393508 snapraid-11.6-windows-x86.zip
|
||||
f07652261e9821a5adfbfa8dad3350aae3e7c285f42a6bd7d96a854e5bc56dda snapraid-12.0.tar.gz
|
||||
a9cd1e30042b09ecc42b508955a1c1144b446a0399c83ecfb78b5455d528938c snapraid-12.0-windows-x64.zip
|
||||
a037d16bb9d226da2c88df00e410f9e637f1acb6153ac078c9a3805e721282a6 snapraid-12.0-windows-x86.zip
|
||||
49337d9bafa96c2beac0125463bd22622be2fc00f3b4dee7e4b0e864d2a49661 snapraid-12.1.tar.gz
|
||||
23196a373b4c7a327a207f019ea833f888977f6e48743b0060706f67fbb1c13e snapraid-12.1-windows-x64.zip
|
||||
488e3b57323fd55c1bccc14a051d4048a1a7b7b5d6440ece30b5161bda9f5498 snapraid-12.1-windows-x86.zip
|
||||
9d30993aef7fd390369dcaf422ac35f3990e8c91f0fb26151f5b84ccb73d3e01 snapraid-12.2.tar.gz
|
||||
1f08ee889b4e0d221267ad011cfbd6f3ebdf94a8809ba2b2d79dbb0751a7c06a snapraid-12.2-windows-x64.zip
|
||||
daaccc71a2b2cf3d16d021d0c1f7db20e49fbaebea5cda6c301bf41bce8df073 snapraid-12.2-windows-x86.zip
|
||||
1f27aba6e5db3929474da9c472fc4a3bc51d4a83aa5385af6b09afc9f68d6d44 snapraid-12.3.tar.gz
|
||||
ffdd430f5f1ad8fba5bd0707bd860b0d3dca55cb8aeca633804638d64b5f0550 snapraid-12.3-windows-x64.zip
|
||||
579d24cc607d0668e6f17c905eb75e409086a58f466c6fae2943c8e2fc8de039 snapraid-12.3-windows-x86.zip
|
17
HISTORY
17
HISTORY
@ -1,19 +1,30 @@
|
||||
SnapRAID HISTORY
|
||||
================
|
||||
|
||||
12.4 2025/01
|
||||
============
|
||||
* Avoid a warning about function pointer conversion. No functional changes.
|
||||
|
||||
12.3 2024/01
|
||||
============
|
||||
* Fix potential integer overflow when computing the completion percentage.
|
||||
No effect on the functionality.
|
||||
* Documentation improvements.
|
||||
|
||||
12.2 2022/08
|
||||
============
|
||||
* Fix build issue with GLIBC 2.36
|
||||
|
||||
12.1 2022/01
|
||||
============
|
||||
* Reduce stack usage to work in environments with limited stack size, like MUSL.
|
||||
* Reduce stack usage to work in environments with limited stack size, like
|
||||
MUSL.
|
||||
* Increase the default disk cache from 8 MiB to 16 MiB.
|
||||
|
||||
12.0 2021/12
|
||||
============
|
||||
* Parallel disk scanning. It's always enabled but it doesn't cover the -m option
|
||||
that still process disks sequentially.
|
||||
* Parallel disk scanning. It's always enabled but it doesn't cover the -m
|
||||
option that still process disks sequentially.
|
||||
|
||||
11.6 2021/10
|
||||
============
|
||||
|
16
INSTALL
16
INSTALL
@ -7,25 +7,27 @@ code from http://www.snapraid.it and unpack it with:
|
||||
tar xf snapraid-*.tar.gz
|
||||
cd snapraid-*
|
||||
|
||||
To configure and build run:
|
||||
To configure and build, run:
|
||||
|
||||
./configure
|
||||
make
|
||||
|
||||
To check for correctness of the application run:
|
||||
To run the correctness tests for the application:
|
||||
|
||||
make check
|
||||
|
||||
If it terminates with "Success", you can install the application and
|
||||
the documentation running as root:
|
||||
If this terminates with "Success", you can install the application and
|
||||
the documentation by running:
|
||||
|
||||
sudo make install
|
||||
|
||||
To start using SnapRAID you have to change the example configuration
|
||||
file snapraid.conf.example to fit your needs and copy it in /etc/snapraid.conf
|
||||
(The snapraid application itself does not require root privileges.)
|
||||
|
||||
To start using SnapRAID, change the example configuration
|
||||
file snapraid.conf.example to fit your needs and copy it to /etc/snapraid.conf
|
||||
|
||||
To get more help, see the "Getting Started" section in the snapraid manpage
|
||||
typing:
|
||||
by typing:
|
||||
|
||||
man snapraid
|
||||
|
||||
|
30
Makefile.am
30
Makefile.am
@ -286,7 +286,7 @@ endif
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) -a check
|
||||
#### CONTROLLED ####
|
||||
$(MSG) Filesystem allocation test
|
||||
head -c 8192 /dev/zero > bench/disk1/TEST
|
||||
dd bs=1 count=8192 if=/dev/zero of=bench/disk1/TEST
|
||||
# Copy the file to trigger the copy optimization check
|
||||
cp -a bench/disk1/TEST bench/disk2/TEST
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) sync
|
||||
@ -301,24 +301,24 @@ endif
|
||||
# Now sync will complete with -E
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) -E sync
|
||||
$(MSG) Filesystem fragmentation test
|
||||
head -c 8192 /dev/zero > bench/disk1/TEST1
|
||||
head -c 8192 /dev/zero > bench/disk1/TEST2
|
||||
head -c 8192 /dev/zero > bench/disk1/TEST3
|
||||
head -c 8192 /dev/zero > bench/disk1/TEST4
|
||||
head -c 8192 /dev/zero > bench/disk1/TEST5
|
||||
head -c 8192 /dev/zero > bench/disk1/TEST6
|
||||
dd bs=1 count=8192 if=/dev/zero of=bench/disk1/TEST1
|
||||
dd bs=1 count=8192 if=/dev/zero of=bench/disk1/TEST2
|
||||
dd bs=1 count=8192 if=/dev/zero of=bench/disk1/TEST3
|
||||
dd bs=1 count=8192 if=/dev/zero of=bench/disk1/TEST4
|
||||
dd bs=1 count=8192 if=/dev/zero of=bench/disk1/TEST5
|
||||
dd bs=1 count=8192 if=/dev/zero of=bench/disk1/TEST6
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) sync
|
||||
# Now delete some files, and create a bigger one to fill the holes
|
||||
rm bench/disk1/TEST1
|
||||
rm bench/disk1/TEST3
|
||||
rm bench/disk1/TEST5
|
||||
head -c 65536 /dev/zero > bench/disk1/TESTX
|
||||
dd bs=1 count=65536 if=/dev/zero of=bench/disk1/TESTX
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) sync -l ">&1"
|
||||
rm -r bench/disk1/TEST*
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) -E sync
|
||||
# Now enforce copy detection of a file without parity
|
||||
# Create a file in a high number disk
|
||||
head -c 8192 /dev/urandom > bench/disk6/STEP1
|
||||
dd bs=1 count=8192 if=/dev/urandom of=bench/disk6/STEP1
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) sync
|
||||
# Create two new copies. The one in disk1 will copy
|
||||
# the hash from the one in disk6, and the one in disk2
|
||||
@ -328,16 +328,16 @@ endif
|
||||
cp -a bench/disk6/STEP1 bench/disk2/STEP1
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) sync
|
||||
# Now create, duplicate, move and partial sync
|
||||
head -c 8192 /dev/zero > bench/disk1/INVA1
|
||||
head -c 8192 /dev/zero > bench/disk1/INVA2
|
||||
head -c 8192 /dev/zero > bench/disk1/INVA3
|
||||
head -c 8192 /dev/zero > bench/disk1/MOVE1
|
||||
dd bs=1 count=8192 if=/dev/zero of=bench/disk1/INVA1
|
||||
dd bs=1 count=8192 if=/dev/zero of=bench/disk1/INVA2
|
||||
dd bs=1 count=8192 if=/dev/zero of=bench/disk1/INVA3
|
||||
dd bs=1 count=8192 if=/dev/zero of=bench/disk1/MOVE1
|
||||
cp -a bench/disk1/MOVE1 bench/disk1/MOVE2
|
||||
cp -a bench/disk1/MOVE1 bench/disk1/MOVE3
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) sync
|
||||
mv bench/disk1/MOVE2 bench/disk2/MOVE2
|
||||
mv bench/disk1/MOVE3 bench/disk3/MOVE3
|
||||
head -c 8192 /dev/zero > bench/disk4/MOVE4
|
||||
dd bs=1 count=8192 if=/dev/zero of=bench/disk4/MOVE4
|
||||
cp -a bench/disk1/INVA1 bench/disk1/EXTRA1
|
||||
cp -a bench/disk1/INVA2 bench/disk1/EXTRA2
|
||||
cp -a bench/disk1/INVA3 bench/disk1/EXTRA3
|
||||
@ -770,7 +770,7 @@ endif
|
||||
$(MSG) This triggers the recovering with q using p to check the validity, but failing for new blocks being filled with zero
|
||||
cp -pR bench/disk1/a bench/disk1/a_copy
|
||||
# Ensure that there is at least one zero filled file
|
||||
head -c 8192 /dev/zero > bench/disk1/a_copy/ZERO_FILLED
|
||||
dd bs=1 count=8192 if=/dev/zero of=bench/disk1/a_copy/ZERO_FILLED
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -B 1 --test-kill-after-sync -c $(CONF) sync
|
||||
rm -r bench/disk1/a_copy
|
||||
$(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-expect-unrecoverable -c $(PAR2) fix -l test-fail-earlysyncadd.log
|
||||
|
1944
Makefile.in
1944
Makefile.in
File diff suppressed because it is too large
Load Diff
44
README
44
README
@ -1,33 +1,29 @@
|
||||
SnapRAID
|
||||
========
|
||||
|
||||
SnapRAID is a backup program for disk arrays. It stores parity
|
||||
information of your data and it recovers from up to six disk
|
||||
failures.
|
||||
SnapRAID is a backup program designed for disk arrays, storing
|
||||
parity information for data recovery in the event of up to six
|
||||
disk failures.
|
||||
|
||||
SnapRAID is mainly targeted for a home media center, where you
|
||||
have a lot of big files that rarely change.
|
||||
Primarily intended for home media centers with large,
|
||||
infrequently changing files, SnapRAID offers several features:
|
||||
|
||||
Beside the ability to recover from disk failures, the other
|
||||
features of SnapRAID are:
|
||||
|
||||
* You can use disk already filled with files, without the need to
|
||||
reformat them. You will access them like now.
|
||||
* All your data is hashed to ensure data integrity and to avoid
|
||||
* You can utilize disks already filled with files without the
|
||||
need to reformat them, accessing them as usual.
|
||||
* All your data is hashed to ensure data integrity and prevent
|
||||
silent corruption.
|
||||
* If the failed disks are too many to allow a recovery,
|
||||
you lose the data only on the failed disks.
|
||||
All the data in the other disks is safe.
|
||||
* If you accidentally delete some files in a disk, you can
|
||||
recover them.
|
||||
* The disks can have different sizes.
|
||||
* When the number of failed disks exceeds the parity count,
|
||||
data loss is confined to the affected disks; data on
|
||||
other disks remains accessible.
|
||||
* If you accidentally delete files on a disk, recovery is
|
||||
possible.
|
||||
* Disks can have different sizes.
|
||||
* You can add disks at any time.
|
||||
* It doesn't lock-in your data. You can stop using SnapRAID at any
|
||||
time without the need to reformat or move data.
|
||||
* To access a file, only a single disk needs to spin, saving power and
|
||||
producing less noise.
|
||||
* SnapRAID doesn't lock in your data; you can stop using it
|
||||
anytime without reformatting or moving data.
|
||||
* To access a file, only a single disk needs to spin, saving
|
||||
power and reducing noise.
|
||||
|
||||
The official site of SnapRAID is:
|
||||
|
||||
http://www.snapraid.it/
|
||||
For more information, please visit the official SnapRAID site:
|
||||
|
||||
:http://www.snapraid.it/
|
||||
|
12
TODO
12
TODO
@ -5,6 +5,18 @@ This is the list of TODO items for SnapRAID.
|
||||
|
||||
- Next
|
||||
|
||||
* Add an option to ignore a specific Smart attribute. This solves PullRequest #17 an #21
|
||||
|
||||
* Support BTRFS subvolumes. Keep track of the subvolumeid, along with the inode, and use it when searching/comparing inodes.
|
||||
The value 0 can be used for the root volume, like a normal filesystem.
|
||||
See: https://github.com/kdave/btrfs-progs/tree/master/libbtrfsutil
|
||||
|
||||
* A "dependents" output option to [--test-fmt file|disk|path|dependents] for LIST.
|
||||
Example, snapraid LIST --test-fmt dependents >FileList_with_dependents.txt
|
||||
The goal is a filelist that, for every file, includes full paths to the dependent files
|
||||
on other data disks needed to repair that file (in addition to the parity data).
|
||||
|
||||
I created a thread about it here: https://sourceforge.net/p/snapraid/discussion/1677233/thread/6e872fdae0/
|
||||
- Minor
|
||||
|
||||
* Add a new -u, --filter-updated command that filters files
|
||||
|
838
aclocal.m4
vendored
838
aclocal.m4
vendored
@ -1,838 +0,0 @@
|
||||
# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
|
||||
# This file 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.
|
||||
|
||||
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
|
||||
[m4_warning([this file was generated for autoconf 2.69.
|
||||
You have another version of autoconf. It may work, but is not guaranteed to.
|
||||
If you have problems, you may need to regenerate the build system entirely.
|
||||
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
||||
|
||||
# Copyright (C) 2002-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# AM_AUTOMAKE_VERSION(VERSION)
|
||||
# ----------------------------
|
||||
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||
# generated from the m4 files accompanying Automake X.Y.
|
||||
# (This private macro should not be called outside this file.)
|
||||
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||
[am__api_version='1.16'
|
||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||
dnl require some minimum version. Point them to the right macro.
|
||||
m4_if([$1], [1.16.2], [],
|
||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||
])
|
||||
|
||||
# _AM_AUTOCONF_VERSION(VERSION)
|
||||
# -----------------------------
|
||||
# aclocal traces this macro to find the Autoconf version.
|
||||
# This is a private macro too. Using m4_define simplifies
|
||||
# the logic in aclocal, which can simply ignore this definition.
|
||||
m4_define([_AM_AUTOCONF_VERSION], [])
|
||||
|
||||
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||
# -------------------------------
|
||||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.16.2])dnl
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||
# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
|
||||
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
|
||||
#
|
||||
# Of course, Automake must honor this variable whenever it calls a
|
||||
# tool from the auxiliary directory. The problem is that $srcdir (and
|
||||
# therefore $ac_aux_dir as well) can be either absolute or relative,
|
||||
# depending on how configure is run. This is pretty annoying, since
|
||||
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
||||
# source directory, any form will work fine, but in subdirectories a
|
||||
# relative path needs to be adjusted first.
|
||||
#
|
||||
# $ac_aux_dir/missing
|
||||
# fails when called from a subdirectory if $ac_aux_dir is relative
|
||||
# $top_srcdir/$ac_aux_dir/missing
|
||||
# fails if $ac_aux_dir is absolute,
|
||||
# fails when called from a subdirectory in a VPATH build with
|
||||
# a relative $ac_aux_dir
|
||||
#
|
||||
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
||||
# are both prefixed by $srcdir. In an in-source build this is usually
|
||||
# harmless because $srcdir is '.', but things will broke when you
|
||||
# start a VPATH build or use an absolute $srcdir.
|
||||
#
|
||||
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
||||
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
||||
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
||||
# and then we would define $MISSING as
|
||||
# MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# This will work as long as MISSING is not called from configure, because
|
||||
# unfortunately $(top_srcdir) has no meaning in configure.
|
||||
# However there are other variables, like CC, which are often used in
|
||||
# configure, and could therefore not use this "fixed" $ac_aux_dir.
|
||||
#
|
||||
# Another solution, used here, is to always expand $ac_aux_dir to an
|
||||
# absolute PATH. The drawback is that using absolute paths prevent a
|
||||
# configured tree to be moved without reconfiguration.
|
||||
|
||||
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
|
||||
# Expand $ac_aux_dir to an absolute path.
|
||||
am_aux_dir=`cd "$ac_aux_dir" && pwd`
|
||||
])
|
||||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||
# -------------------------------------
|
||||
# Define a conditional.
|
||||
AC_DEFUN([AM_CONDITIONAL],
|
||||
[AC_PREREQ([2.52])dnl
|
||||
m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||
AC_SUBST([$1_TRUE])dnl
|
||||
AC_SUBST([$1_FALSE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
|
||||
m4_define([_AM_COND_VALUE_$1], [$2])dnl
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi
|
||||
AC_CONFIG_COMMANDS_PRE(
|
||||
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||
Usually this means the macro was only invoked conditionally.]])
|
||||
fi])])
|
||||
|
||||
# Do all the work for Automake. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file 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 macro actually does too much. Some checks are only needed if
|
||||
# your package does certain things. But this isn't really a big deal.
|
||||
|
||||
dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
|
||||
m4_define([AC_PROG_CC],
|
||||
m4_defn([AC_PROG_CC])
|
||||
[_AM_PROG_CC_C_O
|
||||
])
|
||||
|
||||
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||||
# AM_INIT_AUTOMAKE([OPTIONS])
|
||||
# -----------------------------------------------
|
||||
# The call with PACKAGE and VERSION arguments is the old style
|
||||
# call (pre autoconf-2.50), which is being phased out. PACKAGE
|
||||
# and VERSION should now be passed to AC_INIT and removed from
|
||||
# the call to AM_INIT_AUTOMAKE.
|
||||
# We support both call styles for the transition. After
|
||||
# the next Automake release, Autoconf can make the AC_INIT
|
||||
# arguments mandatory, and then we can depend on a new Autoconf
|
||||
# release and drop the old call support.
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
[AC_PREREQ([2.65])dnl
|
||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||
dnl the ones we care about.
|
||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`"; then
|
||||
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
|
||||
# is not polluted with repeated "-I."
|
||||
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
|
||||
# test to see if srcdir already configured
|
||||
if test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
fi
|
||||
|
||||
# test whether we have cygpath
|
||||
if test -z "$CYGPATH_W"; then
|
||||
if (cygpath --version) >/dev/null 2>/dev/null; then
|
||||
CYGPATH_W='cygpath -w'
|
||||
else
|
||||
CYGPATH_W=echo
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([CYGPATH_W])
|
||||
|
||||
# Define the identity of the package.
|
||||
dnl Distinguish between old-style and new-style calls.
|
||||
m4_ifval([$2],
|
||||
[AC_DIAGNOSE([obsolete],
|
||||
[$0: two- and three-arguments forms are deprecated.])
|
||||
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||
AC_SUBST([PACKAGE], [$1])dnl
|
||||
AC_SUBST([VERSION], [$2])],
|
||||
[_AM_SET_OPTIONS([$1])dnl
|
||||
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
||||
m4_if(
|
||||
m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
|
||||
[ok:ok],,
|
||||
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
||||
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
||||
|
||||
_AM_IF_OPTION([no-define],,
|
||||
[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
|
||||
AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
|
||||
|
||||
# Some tools Automake needs.
|
||||
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
||||
AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
|
||||
AM_MISSING_PROG([AUTOCONF], [autoconf])
|
||||
AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
|
||||
AM_MISSING_PROG([AUTOHEADER], [autoheader])
|
||||
AM_MISSING_PROG([MAKEINFO], [makeinfo])
|
||||
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
|
||||
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
||||
# For better backward compatibility. To be removed once Automake 1.9.x
|
||||
# dies out for good. For more background, see:
|
||||
# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
|
||||
# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
|
||||
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
|
||||
# We need awk for the "check" target (and possibly the TAP driver). The
|
||||
# system "awk" is bad on some platforms.
|
||||
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
||||
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_PROG_TAR([v7])])])
|
||||
_AM_IF_OPTION([no-dependencies],,
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||
[_AM_DEPENDENCIES([CC])],
|
||||
[m4_define([AC_PROG_CC],
|
||||
m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||
[_AM_DEPENDENCIES([CXX])],
|
||||
[m4_define([AC_PROG_CXX],
|
||||
m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
|
||||
[_AM_DEPENDENCIES([OBJC])],
|
||||
[m4_define([AC_PROG_OBJC],
|
||||
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
|
||||
[_AM_DEPENDENCIES([OBJCXX])],
|
||||
[m4_define([AC_PROG_OBJCXX],
|
||||
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
|
||||
])
|
||||
AC_REQUIRE([AM_SILENT_RULES])dnl
|
||||
dnl The testsuite driver may need to know about EXEEXT, so add the
|
||||
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
|
||||
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
|
||||
AC_CONFIG_COMMANDS_PRE(dnl
|
||||
[m4_provide_if([_AM_COMPILER_EXEEXT],
|
||||
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
|
||||
|
||||
# POSIX will say in a future version that running "rm -f" with no argument
|
||||
# is OK; and we want to be able to make that assumption in our Makefile
|
||||
# recipes. So use an aggressive probe to check that the usage we want is
|
||||
# actually supported "in the wild" to an acceptable degree.
|
||||
# See automake bug#10828.
|
||||
# To make any issue more visible, cause the running configure to be aborted
|
||||
# by default if the 'rm' program in use doesn't match our expectations; the
|
||||
# user can still override this though.
|
||||
if rm -f && rm -fr && rm -rf; then : OK; else
|
||||
cat >&2 <<'END'
|
||||
Oops!
|
||||
|
||||
Your 'rm' program seems unable to run without file operands specified
|
||||
on the command line, even when the '-f' option is present. This is contrary
|
||||
to the behaviour of most rm programs out there, and not conforming with
|
||||
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
|
||||
|
||||
Please tell bug-automake@gnu.org about your system, including the value
|
||||
of your $PATH and any error possibly output before this message. This
|
||||
can help us improve future automake versions.
|
||||
|
||||
END
|
||||
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
|
||||
echo 'Configuration will proceed anyway, since you have set the' >&2
|
||||
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
|
||||
echo >&2
|
||||
else
|
||||
cat >&2 <<'END'
|
||||
Aborting the configuration process, to ensure you take notice of the issue.
|
||||
|
||||
You can download and install GNU coreutils to get an 'rm' implementation
|
||||
that behaves properly: <https://www.gnu.org/software/coreutils/>.
|
||||
|
||||
If you want to complete the configuration process using your problematic
|
||||
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
|
||||
to "yes", and re-run configure.
|
||||
|
||||
END
|
||||
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
|
||||
fi
|
||||
fi
|
||||
dnl The trailing newline in this macro's definition is deliberate, for
|
||||
dnl backward compatibility and to allow trailing 'dnl'-style comments
|
||||
dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
|
||||
])
|
||||
|
||||
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
|
||||
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
|
||||
dnl mangled by Autoconf and run in a shell conditional statement.
|
||||
m4_define([_AC_COMPILER_EXEEXT],
|
||||
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
|
||||
|
||||
# When config.status generates a header, we must update the stamp-h file.
|
||||
# This file resides in the same directory as the config header
|
||||
# that is generated. The stamp files are numbered to have different names.
|
||||
|
||||
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
||||
# loop where config.status creates the headers, so we can generate
|
||||
# our stamp files there.
|
||||
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
||||
[# Compute $1's index in $config_headers.
|
||||
_am_arg=$1
|
||||
_am_stamp_count=1
|
||||
for _am_header in $config_headers :; do
|
||||
case $_am_header in
|
||||
$_am_arg | $_am_arg:* )
|
||||
break ;;
|
||||
* )
|
||||
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
||||
esac
|
||||
done
|
||||
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||
|
||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# AM_PROG_INSTALL_SH
|
||||
# ------------------
|
||||
# Define $install_sh.
|
||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
if test x"${install_sh+set}" != xset; then
|
||||
case $am_aux_dir in
|
||||
*\ * | *\ *)
|
||||
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
|
||||
*)
|
||||
install_sh="\${SHELL} $am_aux_dir/install-sh"
|
||||
esac
|
||||
fi
|
||||
AC_SUBST([install_sh])])
|
||||
|
||||
# Copyright (C) 2003-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# Check whether the underlying file-system supports filenames
|
||||
# with a leading dot. For instance MS-DOS doesn't.
|
||||
AC_DEFUN([AM_SET_LEADING_DOT],
|
||||
[rm -rf .tst 2>/dev/null
|
||||
mkdir .tst 2>/dev/null
|
||||
if test -d .tst; then
|
||||
am__leading_dot=.
|
||||
else
|
||||
am__leading_dot=_
|
||||
fi
|
||||
rmdir .tst 2>/dev/null
|
||||
AC_SUBST([am__leading_dot])])
|
||||
|
||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||
# ------------------------------
|
||||
AC_DEFUN([AM_MISSING_PROG],
|
||||
[AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||
$1=${$1-"${am_missing_run}$2"}
|
||||
AC_SUBST($1)])
|
||||
|
||||
# AM_MISSING_HAS_RUN
|
||||
# ------------------
|
||||
# Define MISSING if not defined so far and test if it is modern enough.
|
||||
# If it is, set am_missing_run to use it, otherwise, to nothing.
|
||||
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
AC_REQUIRE_AUX_FILE([missing])dnl
|
||||
if test x"${MISSING+set}" != xset; then
|
||||
case $am_aux_dir in
|
||||
*\ * | *\ *)
|
||||
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
|
||||
*)
|
||||
MISSING="\${SHELL} $am_aux_dir/missing" ;;
|
||||
esac
|
||||
fi
|
||||
# Use eval to expand $SHELL
|
||||
if eval "$MISSING --is-lightweight"; then
|
||||
am_missing_run="$MISSING "
|
||||
else
|
||||
am_missing_run=
|
||||
AC_MSG_WARN(['missing' script is too old or missing])
|
||||
fi
|
||||
])
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# _AM_MANGLE_OPTION(NAME)
|
||||
# -----------------------
|
||||
AC_DEFUN([_AM_MANGLE_OPTION],
|
||||
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
# _AM_SET_OPTION(NAME)
|
||||
# --------------------
|
||||
# Set option NAME. Presently that only means defining a flag for this option.
|
||||
AC_DEFUN([_AM_SET_OPTION],
|
||||
[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
|
||||
|
||||
# _AM_SET_OPTIONS(OPTIONS)
|
||||
# ------------------------
|
||||
# OPTIONS is a space-separated list of Automake options.
|
||||
AC_DEFUN([_AM_SET_OPTIONS],
|
||||
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||
|
||||
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
||||
# -------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
AC_DEFUN([_AM_IF_OPTION],
|
||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
|
||||
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# _AM_PROG_CC_C_O
|
||||
# ---------------
|
||||
# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
|
||||
# to automatically call this.
|
||||
AC_DEFUN([_AM_PROG_CC_C_O],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
AC_REQUIRE_AUX_FILE([compile])dnl
|
||||
AC_LANG_PUSH([C])dnl
|
||||
AC_CACHE_CHECK(
|
||||
[whether $CC understands -c and -o together],
|
||||
[am_cv_prog_cc_c_o],
|
||||
[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
|
||||
# Make sure it works both with $CC and with simple cc.
|
||||
# Following AC_PROG_CC_C_O, we do the test twice because some
|
||||
# compilers refuse to overwrite an existing .o file with -o,
|
||||
# though they will create one.
|
||||
am_cv_prog_cc_c_o=yes
|
||||
for am_i in 1 2; do
|
||||
if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
|
||||
&& test -f conftest2.$ac_objext; then
|
||||
: OK
|
||||
else
|
||||
am_cv_prog_cc_c_o=no
|
||||
break
|
||||
fi
|
||||
done
|
||||
rm -f core conftest*
|
||||
unset am_i])
|
||||
if test "$am_cv_prog_cc_c_o" != yes; then
|
||||
# Losing compiler, so override with the script.
|
||||
# FIXME: It is wrong to rewrite CC.
|
||||
# But if we don't then we get into trouble of one sort or another.
|
||||
# A longer-term fix would be to have automake use am__CC in this case,
|
||||
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
|
||||
CC="$am_aux_dir/compile $CC"
|
||||
fi
|
||||
AC_LANG_POP([C])])
|
||||
|
||||
# For backward compatibility.
|
||||
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
|
||||
|
||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# AM_RUN_LOG(COMMAND)
|
||||
# -------------------
|
||||
# Run COMMAND, save the exit status in ac_status, and log it.
|
||||
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
|
||||
AC_DEFUN([AM_RUN_LOG],
|
||||
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
|
||||
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
|
||||
(exit $ac_status); }])
|
||||
|
||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# AM_SANITY_CHECK
|
||||
# ---------------
|
||||
AC_DEFUN([AM_SANITY_CHECK],
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Reject unsafe characters in $srcdir or the absolute working directory
|
||||
# name. Accept space and tab only in the latter.
|
||||
am_lf='
|
||||
'
|
||||
case `pwd` in
|
||||
*[[\\\"\#\$\&\'\`$am_lf]]*)
|
||||
AC_MSG_ERROR([unsafe absolute working directory name]);;
|
||||
esac
|
||||
case $srcdir in
|
||||
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
|
||||
AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
|
||||
esac
|
||||
|
||||
# Do 'set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
am_has_slept=no
|
||||
for am_try in 1 2; do
|
||||
echo "timestamp, slept: $am_has_slept" > conftest.file
|
||||
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
|
||||
if test "$[*]" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t "$srcdir/configure" conftest.file`
|
||||
fi
|
||||
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
||||
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
if test "$[2]" = conftest.file || test $am_try -eq 2; then
|
||||
break
|
||||
fi
|
||||
# Just in case.
|
||||
sleep 1
|
||||
am_has_slept=yes
|
||||
done
|
||||
test "$[2]" = conftest.file
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
# If we didn't sleep, we still need to ensure time stamps of config.status and
|
||||
# generated files are strictly newer.
|
||||
am_sleep_pid=
|
||||
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
|
||||
( sleep 1 ) &
|
||||
am_sleep_pid=$!
|
||||
fi
|
||||
AC_CONFIG_COMMANDS_PRE(
|
||||
[AC_MSG_CHECKING([that generated files are newer than configure])
|
||||
if test -n "$am_sleep_pid"; then
|
||||
# Hide warnings about reused PIDs.
|
||||
wait $am_sleep_pid 2>/dev/null
|
||||
fi
|
||||
AC_MSG_RESULT([done])])
|
||||
rm -f conftest.file
|
||||
])
|
||||
|
||||
# Copyright (C) 2009-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# AM_SILENT_RULES([DEFAULT])
|
||||
# --------------------------
|
||||
# Enable less verbose build rules; with the default set to DEFAULT
|
||||
# ("yes" being less verbose, "no" or empty being verbose).
|
||||
AC_DEFUN([AM_SILENT_RULES],
|
||||
[AC_ARG_ENABLE([silent-rules], [dnl
|
||||
AS_HELP_STRING(
|
||||
[--enable-silent-rules],
|
||||
[less verbose build output (undo: "make V=1")])
|
||||
AS_HELP_STRING(
|
||||
[--disable-silent-rules],
|
||||
[verbose build output (undo: "make V=0")])dnl
|
||||
])
|
||||
case $enable_silent_rules in @%:@ (((
|
||||
yes) AM_DEFAULT_VERBOSITY=0;;
|
||||
no) AM_DEFAULT_VERBOSITY=1;;
|
||||
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
|
||||
esac
|
||||
dnl
|
||||
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
|
||||
dnl do not support nested variable expansions.
|
||||
dnl See automake bug#9928 and bug#10237.
|
||||
am_make=${MAKE-make}
|
||||
AC_CACHE_CHECK([whether $am_make supports nested variables],
|
||||
[am_cv_make_support_nested_variables],
|
||||
[if AS_ECHO([['TRUE=$(BAR$(V))
|
||||
BAR0=false
|
||||
BAR1=true
|
||||
V=1
|
||||
am__doit:
|
||||
@$(TRUE)
|
||||
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
|
||||
am_cv_make_support_nested_variables=yes
|
||||
else
|
||||
am_cv_make_support_nested_variables=no
|
||||
fi])
|
||||
if test $am_cv_make_support_nested_variables = yes; then
|
||||
dnl Using '$V' instead of '$(V)' breaks IRIX make.
|
||||
AM_V='$(V)'
|
||||
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
|
||||
else
|
||||
AM_V=$AM_DEFAULT_VERBOSITY
|
||||
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
|
||||
fi
|
||||
AC_SUBST([AM_V])dnl
|
||||
AM_SUBST_NOTMAKE([AM_V])dnl
|
||||
AC_SUBST([AM_DEFAULT_V])dnl
|
||||
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
|
||||
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
|
||||
AM_BACKSLASH='\'
|
||||
AC_SUBST([AM_BACKSLASH])dnl
|
||||
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
||||
])
|
||||
|
||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# AM_PROG_INSTALL_STRIP
|
||||
# ---------------------
|
||||
# One issue with vendor 'install' (even GNU) is that you can't
|
||||
# specify the program used to strip binaries. This is especially
|
||||
# annoying in cross-compiling environments, where the build's strip
|
||||
# is unlikely to handle the host's binaries.
|
||||
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
||||
# always use install-sh in "make install-strip", and initialize
|
||||
# STRIPPROG with the value of the STRIP variable (set by the user).
|
||||
AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
||||
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||
# Installed binaries are usually stripped using 'strip' when the user
|
||||
# run "make install-strip". However 'strip' might not be the right
|
||||
# tool to use in cross-compilation environments, therefore Automake
|
||||
# will honor the 'STRIP' environment variable to overrule this program.
|
||||
dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
|
||||
if test "$cross_compiling" != no; then
|
||||
AC_CHECK_TOOL([STRIP], [strip], :)
|
||||
fi
|
||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
|
||||
# Copyright (C) 2006-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# _AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# ---------------------------
|
||||
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
|
||||
# This macro is traced by Automake.
|
||||
AC_DEFUN([_AM_SUBST_NOTMAKE])
|
||||
|
||||
# AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# --------------------------
|
||||
# Public sister of _AM_SUBST_NOTMAKE.
|
||||
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
||||
|
||||
# Check how to create a tarball. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2004-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# _AM_PROG_TAR(FORMAT)
|
||||
# --------------------
|
||||
# Check how to create a tarball in format FORMAT.
|
||||
# FORMAT should be one of 'v7', 'ustar', or 'pax'.
|
||||
#
|
||||
# Substitute a variable $(am__tar) that is a command
|
||||
# writing to stdout a FORMAT-tarball containing the directory
|
||||
# $tardir.
|
||||
# tardir=directory && $(am__tar) > result.tar
|
||||
#
|
||||
# Substitute a variable $(am__untar) that extract such
|
||||
# a tarball read from stdin.
|
||||
# $(am__untar) < result.tar
|
||||
#
|
||||
AC_DEFUN([_AM_PROG_TAR],
|
||||
[# Always define AMTAR for backward compatibility. Yes, it's still used
|
||||
# in the wild :-( We should find a proper way to deprecate it ...
|
||||
AC_SUBST([AMTAR], ['$${TAR-tar}'])
|
||||
|
||||
# We'll loop over all known methods to create a tar archive until one works.
|
||||
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
||||
|
||||
m4_if([$1], [v7],
|
||||
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
|
||||
|
||||
[m4_case([$1],
|
||||
[ustar],
|
||||
[# The POSIX 1988 'ustar' format is defined with fixed-size fields.
|
||||
# There is notably a 21 bits limit for the UID and the GID. In fact,
|
||||
# the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
|
||||
# and bug#13588).
|
||||
am_max_uid=2097151 # 2^21 - 1
|
||||
am_max_gid=$am_max_uid
|
||||
# The $UID and $GID variables are not portable, so we need to resort
|
||||
# to the POSIX-mandated id(1) utility. Errors in the 'id' calls
|
||||
# below are definitely unexpected, so allow the users to see them
|
||||
# (that is, avoid stderr redirection).
|
||||
am_uid=`id -u || echo unknown`
|
||||
am_gid=`id -g || echo unknown`
|
||||
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
|
||||
if test $am_uid -le $am_max_uid; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
_am_tools=none
|
||||
fi
|
||||
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
|
||||
if test $am_gid -le $am_max_gid; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
_am_tools=none
|
||||
fi],
|
||||
|
||||
[pax],
|
||||
[],
|
||||
|
||||
[m4_fatal([Unknown tar format])])
|
||||
|
||||
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||
|
||||
# Go ahead even if we have the value already cached. We do so because we
|
||||
# need to set the values for the 'am__tar' and 'am__untar' variables.
|
||||
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||
|
||||
for _am_tool in $_am_tools; do
|
||||
case $_am_tool in
|
||||
gnutar)
|
||||
for _am_tar in tar gnutar gtar; do
|
||||
AM_RUN_LOG([$_am_tar --version]) && break
|
||||
done
|
||||
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||
am__untar="$_am_tar -xf -"
|
||||
;;
|
||||
plaintar)
|
||||
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||
# ustar tarball either.
|
||||
(tar --version) >/dev/null 2>&1 && continue
|
||||
am__tar='tar chf - "$$tardir"'
|
||||
am__tar_='tar chf - "$tardir"'
|
||||
am__untar='tar xf -'
|
||||
;;
|
||||
pax)
|
||||
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||
am__untar='pax -r'
|
||||
;;
|
||||
cpio)
|
||||
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||
am__untar='cpio -i -H $1 -d'
|
||||
;;
|
||||
none)
|
||||
am__tar=false
|
||||
am__tar_=false
|
||||
am__untar=false
|
||||
;;
|
||||
esac
|
||||
|
||||
# If the value was cached, stop now. We just wanted to have am__tar
|
||||
# and am__untar set.
|
||||
test -n "${am_cv_prog_tar_$1}" && break
|
||||
|
||||
# tar/untar a dummy directory, and stop if the command works.
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
echo GrepMe > conftest.dir/file
|
||||
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||
rm -rf conftest.dir
|
||||
if test -s conftest.tar; then
|
||||
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||
AM_RUN_LOG([cat conftest.dir/file])
|
||||
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||
fi
|
||||
done
|
||||
rm -rf conftest.dir
|
||||
|
||||
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||
|
||||
AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
m4_include([acinclude.m4])
|
@ -1896,7 +1896,7 @@ bail:
|
||||
if (error && !fix)
|
||||
log_fatal("WARNING! There are errors!\n");
|
||||
if (unrecoverable_error)
|
||||
log_fatal("DANGER! There are unrecoverable errors!\n");
|
||||
log_fatal("DANGER! Unrecoverable errors detected!\n");
|
||||
|
||||
log_tag("summary:error:%u\n", error);
|
||||
if (fix)
|
||||
@ -1974,7 +1974,7 @@ int state_check(struct snapraid_state* state, int fix, block_off_t blockstart, b
|
||||
|
||||
if (blockstart > blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Error in the specified starting block %u. It's bigger than the parity size %u.\n", blockstart, blockmax);
|
||||
log_fatal("Error in the specified starting block %u. It's larger than the parity size %u.\n", blockstart, blockmax);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ void state_dry(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
||||
|
||||
if (blockstart > blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Error in the specified starting block %u. It's bigger than the parity size %u.\n", blockstart, blockmax);
|
||||
log_fatal("Error in the specified starting block %u. It's larger than the parity size %u.\n", blockstart, blockmax);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
@ -435,21 +435,21 @@ void file_copy(struct snapraid_file* src_file, struct snapraid_file* dst_file)
|
||||
|
||||
if (src_file->size != dst_file->size) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in copy file with different size\n");
|
||||
log_fatal("Internal inconsistency: Copy file with different size\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
if (src_file->mtime_sec != dst_file->mtime_sec) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in copy file with different mtime_sec\n");
|
||||
log_fatal("Internal inconsistency: Copy file with different mtime_sec\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
if (src_file->mtime_nsec != dst_file->mtime_nsec) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in copy file with different mtime_nsec\n");
|
||||
log_fatal("Internal inconsistency: Copy file with different mtime_nsec\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -499,7 +499,7 @@ int file_block_is_last(struct snapraid_file* file, block_off_t file_pos)
|
||||
|
||||
if (file_pos >= file->blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in file block position\n");
|
||||
log_fatal("Internal inconsistency: File block position over the max\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -620,13 +620,13 @@ struct snapraid_extent* extent_alloc(block_off_t parity_pos, struct snapraid_fil
|
||||
|
||||
if (count == 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency when allocating empty extent for file '%s' at position '%u/%u'\n", file->sub, file_pos, file->blockmax);
|
||||
log_fatal("Internal inconsistency: Allocating empty extent for file '%s' at position '%u/%u'\n", file->sub, file_pos, file->blockmax);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
if (file_pos + count > file->blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency when allocating overflowing extent for file '%s' at position '%u:%u/%u'\n", file->sub, file_pos, count, file->blockmax);
|
||||
log_fatal("Internal inconsistency: Allocating overflowing extent for file '%s' at position '%u:%u/%u'\n", file->sub, file_pos, count, file->blockmax);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -938,7 +938,7 @@ static void extent_parity_check_foreach_unlock(void* void_arg, void* void_obj)
|
||||
|
||||
if (obj->count == 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in parity count zero for file '%s' at '%u'\n",
|
||||
log_fatal("Internal inconsistency: Parity count zero for file '%s' at '%u'\n",
|
||||
obj->file->sub, obj->parity_pos);
|
||||
++arg->result;
|
||||
return;
|
||||
@ -952,7 +952,7 @@ static void extent_parity_check_foreach_unlock(void* void_arg, void* void_obj)
|
||||
/* check the order */
|
||||
if (prev->parity_pos >= obj->parity_pos) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in parity order for files '%s' at '%u:%u' and '%s' at '%u:%u'\n",
|
||||
log_fatal("Internal inconsistency: Parity order for files '%s' at '%u:%u' and '%s' at '%u:%u'\n",
|
||||
prev->file->sub, prev->parity_pos, prev->count, obj->file->sub, obj->parity_pos, obj->count);
|
||||
++arg->result;
|
||||
return;
|
||||
@ -962,7 +962,7 @@ static void extent_parity_check_foreach_unlock(void* void_arg, void* void_obj)
|
||||
/* check that the extents don't overlap */
|
||||
if (prev->parity_pos + prev->count > obj->parity_pos) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency for parity overlap for files '%s' at '%u:%u' and '%s' at '%u:%u'\n",
|
||||
log_fatal("Internal inconsistency: Parity overlap for files '%s' at '%u:%u' and '%s' at '%u:%u'\n",
|
||||
prev->file->sub, prev->parity_pos, prev->count, obj->file->sub, obj->parity_pos, obj->count);
|
||||
++arg->result;
|
||||
return;
|
||||
@ -988,7 +988,7 @@ static void extent_file_check_foreach_unlock(void* void_arg, void* void_obj)
|
||||
|
||||
if (obj->count == 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in file count zero for file '%s' at '%u'\n",
|
||||
log_fatal("Internal inconsistency: File count zero for file '%s' at '%u'\n",
|
||||
obj->file->sub, obj->file_pos);
|
||||
++arg->result;
|
||||
return;
|
||||
@ -1004,7 +1004,7 @@ static void extent_file_check_foreach_unlock(void* void_arg, void* void_obj)
|
||||
/* check that the extent doesn't overflow the file */
|
||||
if (prev->file_pos + prev->count > prev->file->blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in delete end for file '%s' at '%u:%u' overflowing size '%u'\n",
|
||||
log_fatal("Internal inconsistency: Delete end for file '%s' at '%u:%u' overflowing size '%u'\n",
|
||||
prev->file->sub, prev->file_pos, prev->count, prev->file->blockmax);
|
||||
++arg->result;
|
||||
return;
|
||||
@ -1014,7 +1014,7 @@ static void extent_file_check_foreach_unlock(void* void_arg, void* void_obj)
|
||||
/* check that the extent ends the file */
|
||||
if (prev->file_pos + prev->count != prev->file->blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in file end for file '%s' at '%u:%u' instead of size '%u'\n",
|
||||
log_fatal("Internal inconsistency: File end for file '%s' at '%u:%u' instead of size '%u'\n",
|
||||
prev->file->sub, prev->file_pos, prev->count, prev->file->blockmax);
|
||||
++arg->result;
|
||||
return;
|
||||
@ -1027,7 +1027,7 @@ static void extent_file_check_foreach_unlock(void* void_arg, void* void_obj)
|
||||
/* check that the extent doesn't overflow the file */
|
||||
if (obj->file_pos + obj->count > obj->file->blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in delete start for file '%s' at '%u:%u' overflowing size '%u'\n",
|
||||
log_fatal("Internal inconsistency: Delete start for file '%s' at '%u:%u' overflowing size '%u'\n",
|
||||
obj->file->sub, obj->file_pos, obj->count, obj->file->blockmax);
|
||||
++arg->result;
|
||||
return;
|
||||
@ -1037,7 +1037,7 @@ static void extent_file_check_foreach_unlock(void* void_arg, void* void_obj)
|
||||
/* check that the extent starts the file */
|
||||
if (obj->file_pos != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in file start for file '%s' at '%u:%u'\n",
|
||||
log_fatal("Internal inconsistency: File start for file '%s' at '%u:%u'\n",
|
||||
obj->file->sub, obj->file_pos, obj->count);
|
||||
++arg->result;
|
||||
return;
|
||||
@ -1048,7 +1048,7 @@ static void extent_file_check_foreach_unlock(void* void_arg, void* void_obj)
|
||||
/* check the order */
|
||||
if (prev->file_pos >= obj->file_pos) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in file order for file '%s' at '%u:%u' and at '%u:%u'\n",
|
||||
log_fatal("Internal inconsistency: File order for file '%s' at '%u:%u' and at '%u:%u'\n",
|
||||
prev->file->sub, prev->file_pos, prev->count, obj->file_pos, obj->count);
|
||||
++arg->result;
|
||||
return;
|
||||
@ -1059,7 +1059,7 @@ static void extent_file_check_foreach_unlock(void* void_arg, void* void_obj)
|
||||
/* check that the extents don't overlap */
|
||||
if (prev->file_pos + prev->count > obj->file_pos) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in delete sequence for file '%s' at '%u:%u' and at '%u:%u'\n",
|
||||
log_fatal("Internal inconsistency: Delete sequence for file '%s' at '%u:%u' and at '%u:%u'\n",
|
||||
prev->file->sub, prev->file_pos, prev->count, obj->file_pos, obj->count);
|
||||
++arg->result;
|
||||
return;
|
||||
@ -1069,7 +1069,7 @@ static void extent_file_check_foreach_unlock(void* void_arg, void* void_obj)
|
||||
/* check that the extents are sequential */
|
||||
if (prev->file_pos + prev->count != obj->file_pos) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in file sequence for file '%s' at '%u:%u' and at '%u:%u'\n",
|
||||
log_fatal("Internal inconsistency: File sequence for file '%s' at '%u:%u' and at '%u:%u'\n",
|
||||
prev->file->sub, prev->file_pos, prev->count, obj->file_pos, obj->count);
|
||||
++arg->result;
|
||||
return;
|
||||
@ -1267,7 +1267,7 @@ void fs_allocate(struct snapraid_disk* disk, block_off_t parity_pos, struct snap
|
||||
/* ensure that we are extending the extent at the end */
|
||||
if (file_pos != extent->file_pos + extent->count) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency when allocating file '%s' at position '%u/%u' in the middle of extent '%u:%u' in disk '%s'\n", file->sub, file_pos, file->blockmax, extent->file_pos, extent->count, disk->name);
|
||||
log_fatal("Internal inconsistency: Allocating file '%s' at position '%u/%u' in the middle of extent '%u:%u' in disk '%s'\n", file->sub, file_pos, file->blockmax, extent->file_pos, extent->count, disk->name);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1289,7 +1289,7 @@ void fs_allocate(struct snapraid_disk* disk, block_off_t parity_pos, struct snap
|
||||
|
||||
if (parity_extent != extent || file_extent != extent) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency when allocating file '%s' at position '%u/%u' for existing extent '%u:%u' in disk '%s'\n", file->sub, file_pos, file->blockmax, extent->file_pos, extent->count, disk->name);
|
||||
log_fatal("Internal inconsistency: Allocating file '%s' at position '%u/%u' for existing extent '%u:%u' in disk '%s'\n", file->sub, file_pos, file->blockmax, extent->file_pos, extent->count, disk->name);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1313,7 +1313,7 @@ void fs_deallocate(struct snapraid_disk* disk, block_off_t parity_pos)
|
||||
extent = fs_par2extent_get_unlock(disk, &disk->fs_last, parity_pos);
|
||||
if (!extent) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency when deallocating parity position '%u' for not existing extent in disk '%s'\n", parity_pos, disk->name);
|
||||
log_fatal("Internal inconsistency: Deallocating parity position '%u' for not existing extent in disk '%s'\n", parity_pos, disk->name);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1368,7 +1368,7 @@ void fs_deallocate(struct snapraid_disk* disk, block_off_t parity_pos)
|
||||
|
||||
if (parity_extent != second_extent || file_extent != second_extent) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency when deallocating parity position '%u' for splitting extent '%u:%u' in disk '%s'\n", parity_pos, second_extent->file_pos, second_extent->count, disk->name);
|
||||
log_fatal("Internal inconsistency: Deallocating parity position '%u' for splitting extent '%u:%u' in disk '%s'\n", parity_pos, second_extent->file_pos, second_extent->count, disk->name);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1383,7 +1383,7 @@ struct snapraid_block* fs_file2block_get(struct snapraid_file* file, block_off_t
|
||||
{
|
||||
if (file_pos >= file->blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency when dereferencing file '%s' at position '%u/%u'\n", file->sub, file_pos, file->blockmax);
|
||||
log_fatal("Internal inconsistency: Dereferencing file '%s' at position '%u/%u'\n", file->sub, file_pos, file->blockmax);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
@ -1048,7 +1048,7 @@ static inline struct snapraid_file* fs_par2file_get(struct snapraid_disk* disk,
|
||||
ret = fs_par2file_find(disk, parity_pos, file_pos);
|
||||
if (ret == 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency when deresolving parity to file at position '%u' in disk '%s'\n", parity_pos, disk->name);
|
||||
log_fatal("Internal inconsistency: Deresolving parity to file at position '%u' in disk '%s'\n", parity_pos, disk->name);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1072,7 +1072,7 @@ static inline block_off_t fs_file2par_get(struct snapraid_disk* disk, struct sna
|
||||
ret = fs_file2par_find(disk, file, file_pos);
|
||||
if (ret == POS_NULL) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency when resolving file '%s' at position '%u/%u' in disk '%s'\n", file->sub, file_pos, file->blockmax, disk->name);
|
||||
log_fatal("Internal inconsistency: Resolving file '%s' at position '%u/%u' in disk '%s'\n", file->sub, file_pos, file->blockmax, disk->name);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1096,7 +1096,7 @@ static inline struct snapraid_block* fs_par2block_get(struct snapraid_disk* disk
|
||||
ret = fs_par2block_find(disk, parity_pos);
|
||||
if (ret == BLOCK_NULL) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency when deresolving parity to block at position '%u' in disk '%s'\n", parity_pos, disk->name);
|
||||
log_fatal("Internal inconsistency: Deresolving parity to block at position '%u' in disk '%s'\n", parity_pos, disk->name);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
@ -152,8 +152,8 @@ void parity_overflow(struct snapraid_state* state, data_off_t size)
|
||||
}
|
||||
|
||||
if (found) {
|
||||
log_fatal("\nYour data requires more parity than the available space.\n");
|
||||
log_fatal("Please move the files 'outofparity' to another data disk.\n");
|
||||
log_fatal("\nInsufficient parity space. Data requires more parity than available.\n");
|
||||
log_fatal("Move the 'outofparity' files to a larger disk.\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1674,7 +1674,6 @@ static int state_diffscan(struct snapraid_state* state, int is_diff)
|
||||
struct snapraid_scan* scan = i->data;
|
||||
struct snapraid_disk* disk = scan->disk;
|
||||
tommy_node* node;
|
||||
unsigned phy_count;
|
||||
unsigned phy_dup;
|
||||
uint64_t phy_last;
|
||||
struct snapraid_file* phy_file_last;
|
||||
@ -1757,7 +1756,6 @@ static int state_diffscan(struct snapraid_state* state, int is_diff)
|
||||
/* to reuse the just freed space */
|
||||
/* also check if the physical offset reported are fakes or not */
|
||||
node = scan->file_insert_list;
|
||||
phy_count = 0;
|
||||
phy_dup = 0;
|
||||
phy_last = FILEPHY_UNREAD_OFFSET;
|
||||
phy_file_last = 0;
|
||||
@ -1773,13 +1771,12 @@ static int state_diffscan(struct snapraid_state* state, int is_diff)
|
||||
/* if verbose, print the list of duplicates real offsets */
|
||||
/* other cases are for offsets not supported, so we don't need to report them file by file */
|
||||
if (phy_last >= FILEPHY_REAL_OFFSET) {
|
||||
log_fatal("WARNING! Files '%s%s' and '%s%s' have the same physical offset %" PRId64 ".\n", disk->dir, phy_file_last->sub, disk->dir, file->sub, phy_last);
|
||||
log_fatal("WARNING! Files '%s%s' and '%s%s' share the same physical offset %" PRId64 ".\n", disk->dir, phy_file_last->sub, disk->dir, file->sub, phy_last);
|
||||
}
|
||||
++phy_dup;
|
||||
}
|
||||
phy_file_last = file;
|
||||
phy_last = file->physical;
|
||||
++phy_count;
|
||||
}
|
||||
|
||||
/* next node */
|
||||
@ -1859,13 +1856,13 @@ static int state_diffscan(struct snapraid_state* state, int is_diff)
|
||||
}
|
||||
}
|
||||
if (done) {
|
||||
log_fatal("\nare now missing or rewritten!\n");
|
||||
log_fatal("\nare now missing or have been rewritten!\n");
|
||||
if (all_rewritten) {
|
||||
log_fatal("This could happen when restoring a disk with a backup\n");
|
||||
log_fatal("This could occur when restoring a disk from a backup\n");
|
||||
log_fatal("program that is not setting correctly the timestamps.\n");
|
||||
}
|
||||
if (all_missing) {
|
||||
log_fatal("This could happen when some disks are not mounted\n");
|
||||
log_fatal("This could occur when some disks are not mounted\n");
|
||||
log_fatal("in the expected directory.\n");
|
||||
}
|
||||
if (!is_diff) {
|
||||
@ -1891,7 +1888,7 @@ static int state_diffscan(struct snapraid_state* state, int is_diff)
|
||||
}
|
||||
}
|
||||
if (done) {
|
||||
log_fatal(". Files order won't be optimal.\n");
|
||||
log_fatal(". The order of files won't be optimal.\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1910,7 +1907,7 @@ static int state_diffscan(struct snapraid_state* state, int is_diff)
|
||||
}
|
||||
}
|
||||
if (done) {
|
||||
log_fatal(". Not using inodes to detect move operations.\n");
|
||||
log_fatal(". Inodes are not used to detect move operations.\n");
|
||||
}
|
||||
|
||||
/* check for disks with changed UUID */
|
||||
@ -1932,7 +1929,7 @@ static int state_diffscan(struct snapraid_state* state, int is_diff)
|
||||
}
|
||||
}
|
||||
if (done) {
|
||||
log_fatal(". Not using inodes to detect move operations.\n");
|
||||
log_fatal(". Inodes are not used to detect move operations.\n");
|
||||
}
|
||||
|
||||
/* check for disks with unsupported UUID */
|
||||
|
@ -671,7 +671,7 @@ static int state_scrub_process(struct snapraid_state* state, struct snapraid_par
|
||||
if (io_error || silent_error) {
|
||||
log_fatal("Use 'snapraid status' to list the bad blocks.\n");
|
||||
log_fatal("Use 'snapraid -e fix' to recover them.\n");
|
||||
log_fatal("Use 'snapraid -p bad scrub' to recheck after fixing.\n");
|
||||
log_fatal("Use 'snapraid -p bad scrub' to recheck after fixing to clear the bad state.\n");
|
||||
}
|
||||
|
||||
log_tag("summary:error_file:%u\n", error);
|
||||
|
@ -38,7 +38,7 @@ void usage(void)
|
||||
{
|
||||
version();
|
||||
|
||||
printf("Usage: " PACKAGE " status|diff|sync|scrub|list|dup|up|down|smart|pool|check|fix [options]\n");
|
||||
printf("Usage: " PACKAGE " status|diff|sync|scrub|list|dup|up|down|touch|smart|pool|check|fix [options]\n");
|
||||
printf("\n");
|
||||
printf("Commands:\n");
|
||||
printf(" status Print the status of the array\n");
|
||||
@ -49,6 +49,7 @@ void usage(void)
|
||||
printf(" dup Find duplicate files\n");
|
||||
printf(" up Spin-up the array\n");
|
||||
printf(" down Spin-down the array\n");
|
||||
printf(" touch Add non-zero ns timestamps to files\n");
|
||||
printf(" smart SMART attributes of the array\n");
|
||||
printf(" pool Create or update the virtual view of the array\n");
|
||||
printf(" check Check the array\n");
|
||||
@ -1083,28 +1084,28 @@ int main(int argc, char* argv[])
|
||||
|
||||
if (opt.force_full && opt.force_nocopy) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("You cannot use the -F, --force-full and -N, --force-nocopy options at the same time\n");
|
||||
log_fatal("You cannot use the -F, --force-full and -N, --force-nocopy options simultaneously\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
if (opt.force_realloc && opt.force_nocopy) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("You cannot use the -R, --force-realloc and -N, --force-nocopy options at the same time\n");
|
||||
log_fatal("You cannot use the -R, --force-realloc and -N, --force-nocopy options simultaneously\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
if (opt.force_realloc && opt.force_full) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("You cannot use the -R, --force-realloc and -F, --force-full options at the same time\n");
|
||||
log_fatal("You cannot use the -R, --force-realloc and -F, --force-full options simultaneously\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
if (opt.prehash && opt.force_nocopy) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("You cannot use the -h, --pre-hash and -N, --force-nocopy options at the same time\n");
|
||||
log_fatal("You cannot use the -h, --pre-hash and -N, --force-nocopy options simultaneously\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1148,7 +1149,7 @@ int main(int argc, char* argv[])
|
||||
/* because we don't keep the information on what disk is the error */
|
||||
if (filter_error != 0 && !tommy_list_empty(&filterlist_disk)) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("You cannot use -e, --filter-error and -d, --filter-disk at the same time\n");
|
||||
log_fatal("You cannot use -e, --filter-error and -d, --filter-disk simultaneously\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1160,7 +1161,7 @@ int main(int argc, char* argv[])
|
||||
default :
|
||||
if (import_timestamp != 0 || import_content != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("You cannot import with the '%s' command\n", command);
|
||||
log_fatal("Import not allowed with the '%s' command\n", command);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1286,9 +1287,9 @@ int main(int argc, char* argv[])
|
||||
if (lock == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
if (errno != EWOULDBLOCK) {
|
||||
log_fatal("Error creating the lock file '%s'. %s.\n", state.lockfile, strerror(errno));
|
||||
log_fatal("Failed to create the lock file '%s'. %s.\n", state.lockfile, strerror(errno));
|
||||
} else {
|
||||
log_fatal("The lock file '%s' is already locked!\n", state.lockfile);
|
||||
log_fatal("The lock file '%s' is already in use!\n", state.lockfile);
|
||||
log_fatal("SnapRAID is already in use!\n");
|
||||
}
|
||||
exit(EXIT_FAILURE);
|
||||
@ -1354,7 +1355,7 @@ int main(int argc, char* argv[])
|
||||
ret = system(run); /* ignore error */
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Error in running command '%s'.\n", run);
|
||||
log_fatal("Error executing command '%s'.\n", run);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1377,7 +1378,7 @@ int main(int argc, char* argv[])
|
||||
if ((state.need_write || state.opt.force_content_write))
|
||||
state_write(&state);
|
||||
} else {
|
||||
log_fatal("WARNING! Skipped state write for --test-kill-after-sync option.\n");
|
||||
log_fatal("WARNING! Skipped writing state due to --test-kill-after-sync option.\n");
|
||||
}
|
||||
|
||||
/* abort if required */
|
||||
@ -1526,7 +1527,7 @@ int main(int argc, char* argv[])
|
||||
if (!opt.skip_lock && state.lockfile[0]) {
|
||||
if (lock_unlock(lock) == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Error closing the lock file '%s'. %s.\n", state.lockfile, strerror(errno));
|
||||
log_fatal("Failed to close the lock file '%s'. %s.\n", state.lockfile, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
154
cmdline/state.c
154
cmdline/state.c
@ -211,7 +211,7 @@ static void state_config_check(struct snapraid_state* state, const char* path, t
|
||||
if (state->raid_mode == RAID_MODE_VANDERMONDE) {
|
||||
if (state->level > 3) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("If you use the z-parity you cannot have more than 3 parities.\n");
|
||||
log_fatal("Using z-parity limits you to a maximum of 3 parities.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STIO */
|
||||
}
|
||||
@ -220,7 +220,7 @@ static void state_config_check(struct snapraid_state* state, const char* path, t
|
||||
for (l = 0; l < state->level; ++l) {
|
||||
if (state->parity[l].split_mac == 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("No '%s' specification in '%s'\n", lev_config_name(l), path);
|
||||
log_fatal("Missing '%s' specification in '%s'\n", lev_config_name(l), path);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -228,7 +228,7 @@ static void state_config_check(struct snapraid_state* state, const char* path, t
|
||||
|
||||
if (tommy_list_empty(&state->contentlist)) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("No 'content' specification in '%s'\n", path);
|
||||
log_fatal("Missing 'content' specification in '%s'\n", path);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -855,7 +855,7 @@ void state_config(struct snapraid_state* state, const char* path, const char* co
|
||||
pathimport(device, sizeof(device), buffer);
|
||||
slash = strrchr(device, '/');
|
||||
if (slash)
|
||||
*slash = 0;
|
||||
*(slash + 1) = 0;
|
||||
else
|
||||
pathcpy(device, sizeof(device), ".");
|
||||
if (stat(device, &st) == 0) {
|
||||
@ -992,14 +992,14 @@ void state_config(struct snapraid_state* state, const char* path, const char* co
|
||||
ret = sgettok(f, buffer, sizeof(buffer));
|
||||
if (ret < 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Invalid 'smartctl' name specification in '%s' at line %u\n", path, line);
|
||||
log_fatal("Invalid 'smartctl' name in '%s' at line %u\n", path, line);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
if (!*buffer) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Empty 'smartctl' name specification in '%s' at line %u\n", path, line);
|
||||
log_fatal("Empty 'smartctl' name in '%s' at line %u\n", path, line);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1009,21 +1009,21 @@ void state_config(struct snapraid_state* state, const char* path, const char* co
|
||||
ret = sgetlasttok(f, custom, sizeof(custom));
|
||||
if (ret < 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Invalid 'smartctl' option specification in '%s' at line %u\n", path, line);
|
||||
log_fatal("Invalid 'smartctl' option in '%s' at line %u\n", path, line);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
if (!*custom) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Empty 'smartctl' option specification in '%s' at line %u\n", path, line);
|
||||
log_fatal("Empty 'smartctl' option in '%s' at line %u\n", path, line);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
if (validate_smartctl(custom) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Invalid 'smartctl' option specification in '%s' at line %u\n", path, line);
|
||||
log_fatal("Invalid 'smartctl' option in '%s' at line %u\n", path, line);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1032,7 +1032,7 @@ void state_config(struct snapraid_state* state, const char* path, const char* co
|
||||
if (lev_config_scan(buffer, &level, 0) == 0) {
|
||||
if (state->parity[level].smartctl[0] != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Duplicate parity smartctl '%s' at line %u\n", buffer, line);
|
||||
log_fatal("Duplicate parity 'smartctl' '%s' at line %u\n", buffer, line);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1050,7 +1050,7 @@ void state_config(struct snapraid_state* state, const char* path, const char* co
|
||||
}
|
||||
if (!disk) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Missing disk smartctl '%s' at line %u\n", buffer, line);
|
||||
log_fatal("Missing disk 'smartctl' '%s' at line %u\n", buffer, line);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1087,7 +1087,7 @@ void state_config(struct snapraid_state* state, const char* path, const char* co
|
||||
if (!filter) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Invalid 'exclude' specification '%s' in '%s' at line %u\n", buffer, path, line);
|
||||
log_fatal("Filters using relative paths are not supported. Ensure to add an initial slash\n");
|
||||
log_fatal("Filters with relative paths are not supported. Ensure to add an initial slash\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1114,7 +1114,7 @@ void state_config(struct snapraid_state* state, const char* path, const char* co
|
||||
if (!filter) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Invalid 'include' specification '%s' in '%s' at line %u\n", buffer, path, line);
|
||||
log_fatal("Filters using relative paths are not supported. Ensure to add an initial slash\n");
|
||||
log_fatal("Filters with relative paths are not supported. Ensure to add an initial slash\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1218,7 +1218,7 @@ void state_config(struct snapraid_state* state, const char* path, const char* co
|
||||
/* by default use a random hash seed */
|
||||
if (randomize(state->hashseed, HASH_MAX) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Failed to get random values.\n");
|
||||
log_fatal("Failed to retrieve random values.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1408,7 +1408,7 @@ static void state_map(struct snapraid_state* state)
|
||||
disk = find_disk_by_name(state, map->name);
|
||||
if (disk == 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency for mapping '%s'\n", map->name);
|
||||
log_fatal("Internal inconsistency: Mapping not found for '%s'\n", map->name);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1477,11 +1477,11 @@ static void state_map(struct snapraid_state* state)
|
||||
|
||||
if (!state->opt.force_uuid && uuid_mismatch > state->level) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Too many disks have UUID changed from the latest 'sync'.\n");
|
||||
log_fatal("If this happens because you really replaced them,\n");
|
||||
log_fatal("you can '%s' anyway, using 'snapraid --force-uuid %s'.\n", state->command, state->command);
|
||||
log_fatal("Instead, it's possible that you messed up the disk mount points,\n");
|
||||
log_fatal("and you have to restore the mount points at the state of the latest sync.\n");
|
||||
log_fatal("Too many disks have changed UUIDs since the last 'sync'.\n");
|
||||
log_fatal("If this happened because you actually replaced them,\n");
|
||||
log_fatal("you can still '%s', using 'snapraid --force-uuid %s'.\n", state->command, state->command);
|
||||
log_fatal("Alternatively, you may have misconfigured the disk mount points,\n");
|
||||
log_fatal("and you need to restore the mount points to the state of the latest sync.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1498,7 +1498,7 @@ static void state_map(struct snapraid_state* state)
|
||||
/* ensure to don't go over the limit of the RAID engine */
|
||||
if (diskcount > RAID_DATA_MAX) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Too many data disks. No more than %u.\n", RAID_DATA_MAX);
|
||||
log_fatal("Too many data disks. Maximum allowed is %u.\n", RAID_DATA_MAX);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1510,15 +1510,15 @@ static void state_map(struct snapraid_state* state)
|
||||
if (!state->opt.no_warnings) {
|
||||
/* intentionally use log_fatal() instead of log_error() to give more visibility at the warning */
|
||||
if (diskcount >= 36 && state->level < 6) {
|
||||
log_fatal("WARNING! With %u disks it's recommended to use six parity levels.\n", diskcount);
|
||||
log_fatal("WARNING! For %u disks, it's recommended to use six parity levels.\n", diskcount);
|
||||
} else if (diskcount >= 29 && state->level < 5) {
|
||||
log_fatal("WARNING! With %u disks it's recommended to use five parity levels.\n", diskcount);
|
||||
log_fatal("WARNING! For %u disks, it's recommended to use five parity levels.\n", diskcount);
|
||||
} else if (diskcount >= 22 && state->level < 4) {
|
||||
log_fatal("WARNING! With %u disks it's recommended to use four parity levels.\n", diskcount);
|
||||
log_fatal("WARNING! For %u disks, it's recommended to use four parity levels.\n", diskcount);
|
||||
} else if (diskcount >= 15 && state->level < 3) {
|
||||
log_fatal("WARNING! With %u disks it's recommended to use three parity levels.\n", diskcount);
|
||||
log_fatal("WARNING! For %u disks, it's recommended to use three parity levels.\n", diskcount);
|
||||
} else if (diskcount >= 5 && state->level < 2) {
|
||||
log_fatal("WARNING! With %u disks it's recommended to use two parity levels.\n", diskcount);
|
||||
log_fatal("WARNING! For %u disks, it's recommended to use two parity levels.\n", diskcount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1539,7 +1539,7 @@ void state_refresh(struct snapraid_state* state)
|
||||
disk = find_disk_by_name(state, map->name);
|
||||
if (disk == 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency for mapping '%s'\n", map->name);
|
||||
log_fatal("Internal inconsistency: Mapping not found for '%s'\n", map->name);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1547,7 +1547,7 @@ void state_refresh(struct snapraid_state* state)
|
||||
ret = fsinfo(disk->dir, 0, 0, &total_space, &free_space);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Error accessing disk '%s' to get file-system info. %s.\n", disk->dir, strerror(errno));
|
||||
log_fatal("Error accessing disk '%s' to retrieve file-system info. %s.\n", disk->dir, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1575,7 +1575,7 @@ void state_refresh(struct snapraid_state* state)
|
||||
ret = fsinfo(state->parity[l].split_map[s].path, 0, 0, &total_space, &free_space);
|
||||
if (ret != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Error accessing file '%s' to get file-system info. %s.\n", state->parity[l].split_map[s].path, strerror(errno));
|
||||
log_fatal("Error accessing file '%s' to retrieve file-system info. %s.\n", state->parity[l].split_map[s].path, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1605,13 +1605,13 @@ static void state_content_check(struct snapraid_state* state, const char* path)
|
||||
struct snapraid_map* other = j->data;
|
||||
if (strcmp(map->name, other->name) == 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Colliding 'map' disk specification in '%s'\n", path);
|
||||
log_fatal("Conflicting 'map' disk specification in '%s'\n", path);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
if (map->position == other->position) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Colliding 'map' index specification in '%s'\n", path);
|
||||
log_fatal("Conflicting 'map' index specification in '%s'\n", path);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1710,7 +1710,7 @@ static void decoding_error(const char* path, STREAM* f)
|
||||
if (seof(f)) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Unexpected end of content file '%s' at offset %" PRIi64 "\n", path, stell(f));
|
||||
log_fatal("This content file is truncated. Use an alternate copy.\n");
|
||||
log_fatal("This content file is truncated. Please use an alternate copy.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1722,11 +1722,11 @@ static void decoding_error(const char* path, STREAM* f)
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
log_fatal("Decoding error in '%s' at offset %" PRIi64 "\n", path, stell(f));
|
||||
log_fatal("Error decoding '%s' at offset %" PRIi64 "\n", path, stell(f));
|
||||
|
||||
if (sdeplete(f, buf) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Error flushing the content file '%s' at offset %" PRIi64 "\n", path, stell(f));
|
||||
log_fatal("Failed to flush content file '%s' at offset %" PRIi64 "\n", path, stell(f));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1741,11 +1741,11 @@ static void decoding_error(const char* path, STREAM* f)
|
||||
crc_stored = crc32c(crc_stored, buf, 4);
|
||||
|
||||
if (crc_computed != crc_stored) {
|
||||
log_fatal("Mismatching CRC in '%s'\n", path);
|
||||
log_fatal("This content file is damaged! Use an alternate copy.\n");
|
||||
log_fatal("CRC mismatch in '%s'\n", path);
|
||||
log_fatal("This content file is damaged! Please use an alternate copy.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
} else {
|
||||
log_fatal("The file CRC is correct!\n");
|
||||
log_fatal("The CRC of the file is correct!\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1831,7 +1831,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (ret < 0 || mapping >= mapping_max) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency in mapping index!\n");
|
||||
log_fatal("Internal inconsistency: File mapping index out of range\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1848,7 +1848,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (state->block_size == 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency due zero blocksize!\n");
|
||||
log_fatal("Internal inconsistency: Zero blocksize\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1857,7 +1857,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (v_size / state->block_size > blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency in file size too big!\n");
|
||||
log_fatal("Internal inconsistency: File size too big!\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1902,7 +1902,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (!*sub) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency for null file!\n");
|
||||
log_fatal("Internal inconsistency: Null file!\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1944,7 +1944,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (v_idx + v_count > file->blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency in block number!\n");
|
||||
log_fatal("Internal inconsistency: Block number out of range\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1952,7 +1952,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (v_pos + v_count > blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency in block size %u/%u!\n", blockmax, v_pos + v_count);
|
||||
log_fatal("Internal inconsistency: Block size %u/%u!\n", blockmax, v_pos + v_count);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_START */
|
||||
}
|
||||
@ -2076,7 +2076,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (v_pos + v_count > blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency in info size %u/%u!\n", blockmax, v_pos + v_count);
|
||||
log_fatal("Internal inconsistency: Info size %u/%u!\n", blockmax, v_pos + v_count);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -2108,7 +2108,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (rehash && state->prevhash == HASH_UNDEFINED) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency for missing previous checksum!\n");
|
||||
log_fatal("Internal inconsistency: Missing previous checksum!\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -2127,7 +2127,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (!info) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency for missing info!\n");
|
||||
log_fatal("Internal inconsistency: Missing info!\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -2151,7 +2151,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (ret < 0 || mapping >= mapping_max) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency in mapping index!\n");
|
||||
log_fatal("Internal inconsistency: Hole mapping index out of range\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -2174,7 +2174,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (v_pos + v_count > blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency in hole size %u/%u!\n", blockmax, v_pos + v_count);
|
||||
log_fatal("Internal inconsistency: Hole size %u/%u!\n", blockmax, v_pos + v_count);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -2251,7 +2251,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (ret < 0 || mapping >= mapping_max) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency in mapping index!\n");
|
||||
log_fatal("Internal inconsistency: Symlink mapping index out of range\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -2268,7 +2268,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (!*sub) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency for null symlink!\n");
|
||||
log_fatal("Internal inconsistency: Null symlink!\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -2302,7 +2302,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (ret < 0 || mapping >= mapping_max) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency in mapping index!\n");
|
||||
log_fatal("Internal inconsistency: Hardlink mapping index out of range!\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -2319,7 +2319,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (!*sub) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency for null hardlink!\n");
|
||||
log_fatal("Internal inconsistency: Null hardlink!\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -2335,7 +2335,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (!*linkto) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency for empty hardlink '%s'!\n", sub);
|
||||
log_fatal("Internal inconsistency: Empty hardlink '%s'!\n", sub);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -2360,7 +2360,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (ret < 0 || mapping >= mapping_max) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency in mapping index!\n");
|
||||
log_fatal("Internal inconsistency: Dir mapping index ouf of range!\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -2377,7 +2377,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (!*sub) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
log_fatal("Internal inconsistency for null dir!\n");
|
||||
log_fatal("Internal inconsistency: Null dir!\n");
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -2819,8 +2819,8 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
if (crc_stored != crc_computed) {
|
||||
/* LCOV_EXCL_START */
|
||||
/* here don't call decoding_error() because it's too late to get the crc */
|
||||
log_fatal("Mismatching CRC in '%s'\n", path);
|
||||
log_fatal("This content file is damaged! Use an alternate copy.\n");
|
||||
log_fatal("CRC mismatch in '%s'\n", path);
|
||||
log_fatal("The content file is damaged! Please use an alternate copy.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -2846,7 +2846,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
|
||||
if (!crc_checked) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Finished reading '%s' without finding the CRC\n", path);
|
||||
log_fatal("Reached the end of '%s' without finding the expected CRC\n", path);
|
||||
log_fatal("This content file is truncated or damaged! Use an alternate copy.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
@ -2858,7 +2858,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
||||
/* check that the stored parity size matches the loaded state */
|
||||
if (blockmax != parity_allocated_size(state)) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in parity size %u/%u in '%s' at offset %" PRIi64 "\n", blockmax, parity_allocated_size(state), path, stell(f));
|
||||
log_fatal("Internal inconsistency: Parity size %u/%u in '%s' at offset %" PRIi64 "\n", blockmax, parity_allocated_size(state), path, stell(f));
|
||||
if (state->opt.skip_content_check) {
|
||||
log_fatal("Overriding.\n");
|
||||
blockmax = parity_allocated_size(state);
|
||||
@ -3009,7 +3009,7 @@ static void* state_write_thread(void* arg)
|
||||
disk = find_disk_by_name(state, map->name);
|
||||
if (!disk) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency for unmapped disk '%s'\n", map->name);
|
||||
log_fatal("Internal inconsistency: Unmapped disk '%s'\n", map->name);
|
||||
return context;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -3130,7 +3130,7 @@ static void* state_write_thread(void* arg)
|
||||
break;
|
||||
default :
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in state for block %u state %u\n", v_pos, v_state);
|
||||
log_fatal("Internal inconsistency: State for block %u state %u\n", v_pos, v_state);
|
||||
return context;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -3340,8 +3340,8 @@ static void* state_write_thread(void* arg)
|
||||
/* with the one of the data written to the stream */
|
||||
if (crc != scrc_stream(f)) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("CRC mismatch writing the content stream.\n");
|
||||
log_fatal("DANGER! Your RAM memory is broken! DO NOT PROCEED UNTIL FIXED!\n");
|
||||
log_fatal("CRC mismatch while writing the content stream.\n");
|
||||
log_fatal("DANGER! Your RAM memory is faulty! DO NOT PROCEED UNTIL FIXED!\n");
|
||||
log_fatal("Try running a memory test like http://www.memtest86.com/\n");
|
||||
return context;
|
||||
/* LCOV_EXCL_STOP */
|
||||
@ -3435,7 +3435,7 @@ static void state_write_content(struct snapraid_state* state, uint32_t* out_crc)
|
||||
disk = find_disk_by_name(state, map->name);
|
||||
if (!disk) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency for unmapped disk '%s'\n", map->name);
|
||||
log_fatal("Internal inconsistency: Unmapped disk '%s'\n", map->name);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -3724,7 +3724,7 @@ void state_read(struct snapraid_state* state)
|
||||
|
||||
/* otherwise continue */
|
||||
if (node->next) {
|
||||
log_fatal("WARNING! Content file '%s' not found, trying with another copy...\n", path);
|
||||
log_fatal("WARNING! Content file '%s' not found, attempting with another copy...\n", path);
|
||||
|
||||
/* ensure to rewrite all the content files */
|
||||
state->need_write = 1;
|
||||
@ -3862,7 +3862,7 @@ static void* state_verify_thread(void* arg)
|
||||
|
||||
if (sdeplete(f, buf) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Error flushing the content file '%s'. %s.\n", serrorfile(f), strerror(errno));
|
||||
log_fatal("Failed to flush content file '%s'. %s.\n", serrorfile(f), strerror(errno));
|
||||
return context;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -4245,7 +4245,7 @@ void state_progress_end(struct snapraid_state* state, block_off_t countpos, bloc
|
||||
|
||||
elapsed = now - state->progress_whole_start - state->progress_wasted;
|
||||
|
||||
msg_bar("%u%% completed, %u MB accessed", countpos * 100 / countmax, countsize_MB);
|
||||
msg_bar("%u%% completed, %u MB accessed", muldiv(countpos, 100, countmax), countsize_MB);
|
||||
|
||||
msg_bar(" in %u:%02u", (unsigned)(elapsed / 3600), (unsigned)((elapsed % 3600) / 60));
|
||||
|
||||
@ -4405,7 +4405,7 @@ static void state_progress_graph(struct snapraid_state* state, struct snapraid_i
|
||||
struct snapraid_disk* disk = i->data;
|
||||
v = disk->progress_tick[current] - ref(disk->progress_tick, oldest);
|
||||
printr(disk->name, pad);
|
||||
printf("%3" PRIu64 "%% | ", v * 100 / tick_total);
|
||||
printf("%3u%% | ", muldiv(v, 100, tick_total));
|
||||
printc('*', v * bar / tick_total);
|
||||
printf("\n");
|
||||
|
||||
@ -4416,32 +4416,32 @@ static void state_progress_graph(struct snapraid_state* state, struct snapraid_i
|
||||
for (l = 0; l < state->level; ++l) {
|
||||
v = state->parity[l].progress_tick[current] - ref(state->parity[l].progress_tick, oldest);
|
||||
printr(lev_config_name(l), pad);
|
||||
printf("%3" PRIu64 "%% | ", v * 100 / tick_total);
|
||||
printf("%3u%% | ", muldiv(v, 100, tick_total));
|
||||
printc('*', v * bar / tick_total);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
v = state->progress_tick_raid[current] - ref(state->progress_tick_raid, oldest);
|
||||
printr("raid", pad);
|
||||
printf("%3" PRIu64 "%% | ", v * 100 / tick_total);
|
||||
printf("%3u%% | ", muldiv(v, 100, tick_total));
|
||||
printc('*', v * bar / tick_total);
|
||||
printf("\n");
|
||||
|
||||
v = state->progress_tick_hash[current] - ref(state->progress_tick_hash, oldest);
|
||||
printr("hash", pad);
|
||||
printf("%3" PRIu64 "%% | ", v * 100 / tick_total);
|
||||
printf("%3u%% | ", muldiv(v, 100, tick_total));
|
||||
printc('*', v * bar / tick_total);
|
||||
printf("\n");
|
||||
|
||||
v = state->progress_tick_sched[current] - ref(state->progress_tick_sched, oldest);
|
||||
printr("sched", pad);
|
||||
printf("%3" PRIu64 "%% | ", v * 100 / tick_total);
|
||||
printf("%3u%% | ", muldiv(v, 100, tick_total));
|
||||
printc('*', v * bar / tick_total);
|
||||
printf("\n");
|
||||
|
||||
v = state->progress_tick_misc[current] - ref(state->progress_tick_misc, oldest);
|
||||
printr("misc", pad);
|
||||
printf("%3" PRIu64 "%% | ", v * 100 / tick_total);
|
||||
printf("%3u%% | ", muldiv(v, 100, tick_total));
|
||||
printc('*', v * bar / tick_total);
|
||||
printf("\n");
|
||||
|
||||
@ -4499,7 +4499,7 @@ int state_progress(struct snapraid_state* state, struct snapraid_io* io, block_o
|
||||
|
||||
/* completion percentage */
|
||||
if (countmax)
|
||||
out_perc = countpos * 100 / countmax;
|
||||
out_perc = muldiv(countpos, 100, countmax);
|
||||
|
||||
/* if we have at least 5 measures */
|
||||
if (state->progress_tick >= 5
|
||||
@ -4565,11 +4565,11 @@ int state_progress(struct snapraid_state* state, struct snapraid_io* io, block_o
|
||||
|
||||
/* estimate the cpu usage percentage */
|
||||
if (delta_tick_total != 0)
|
||||
out_cpu = (unsigned)(delta_tick_cpu * 100U / delta_tick_total);
|
||||
out_cpu = muldiv(delta_tick_cpu, 100, delta_tick_total);
|
||||
|
||||
/* estimate the remaining time in minutes */
|
||||
if (delta_pos != 0)
|
||||
out_eta = (countmax - countpos) * delta_time / (60 * delta_pos);
|
||||
out_eta = muldiv(countmax - countpos, delta_time, 60 * delta_pos);
|
||||
|
||||
if (state->opt.force_stats) {
|
||||
os_clear();
|
||||
@ -4734,7 +4734,7 @@ void state_fscheck(struct snapraid_state* state, const char* ope)
|
||||
|
||||
if (fs_check(disk) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Internal inconsistency in file-system for disk '%s' %s\n", disk->name, ope);
|
||||
log_fatal("Internal inconsistency: File-system check for disk '%s' %s\n", disk->name, ope);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
@ -39,14 +39,6 @@ unsigned day_ago(time_t ref, time_t now)
|
||||
#define GRAPH_COLUMN 70
|
||||
#define GRAPH_ROW 15
|
||||
|
||||
static unsigned perc(uint64_t part, uint64_t total)
|
||||
{
|
||||
if (!total)
|
||||
return 0;
|
||||
|
||||
return (unsigned)(part * 100 / total);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bit used to mark unscrubbed time info.
|
||||
*/
|
||||
@ -239,7 +231,7 @@ int state_status(struct snapraid_state* state)
|
||||
printf(" - ");
|
||||
} else {
|
||||
printf("%8" PRIu64, (disk_block_max - disk_block_count) * (uint64_t)state->block_size / GIGA);
|
||||
printf(" %3u%%", perc(disk_block_count, disk_block_max));
|
||||
printf(" %3u%%", muldiv(disk_block_count, 100, disk_block_max));
|
||||
}
|
||||
printf(" %s\n", disk->name);
|
||||
|
||||
@ -266,7 +258,7 @@ int state_status(struct snapraid_state* state)
|
||||
printf("%8.1f", (double)all_wasted / GIGA);
|
||||
printf("%8" PRIu64, file_size / GIGA);
|
||||
printf("%8" PRIu64, file_block_free * state->block_size / GIGA);
|
||||
printf(" %3u%%", perc(file_block_count, file_block_count + file_block_free));
|
||||
printf(" %3u%%", muldiv(file_block_count, 100, file_block_count + file_block_free));
|
||||
printf("\n");
|
||||
|
||||
/* warn about invalid data free info */
|
||||
@ -468,26 +460,26 @@ int state_status(struct snapraid_state* state)
|
||||
|
||||
if (unsynced_blocks) {
|
||||
printf("WARNING! The array is NOT fully synced.\n");
|
||||
printf("You have a sync in progress at %u%%.\n", (blockmax - unsynced_blocks) * 100 / blockmax);
|
||||
printf("You have a sync in progress at %u%%.\n", muldiv(blockmax - unsynced_blocks, 100, blockmax));
|
||||
} else {
|
||||
printf("No sync is in progress.\n");
|
||||
}
|
||||
|
||||
if (unscrubbed_blocks) {
|
||||
printf("The %u%% of the array is not scrubbed.\n", (unscrubbed_blocks * 100 + blockmax - 1) / blockmax);
|
||||
printf("%u%% of the array is not scrubbed.\n", muldiv_upper(unscrubbed_blocks, 100, blockmax));
|
||||
} else {
|
||||
printf("The full array was scrubbed at least one time.\n");
|
||||
}
|
||||
|
||||
if (file_zerosubsecond) {
|
||||
printf("You have %u files with zero sub-second timestamp.\n", file_zerosubsecond);
|
||||
printf("Run the 'touch' command to set it to a not zero value.\n");
|
||||
printf("You have %u files with a zero sub-second timestamp.\n", file_zerosubsecond);
|
||||
printf("Run 'snapraid touch' to set their sub-second timestamps to a non-zero value.\n");
|
||||
} else {
|
||||
printf("No file has a zero sub-second timestamp.\n");
|
||||
}
|
||||
|
||||
if (rehash) {
|
||||
printf("You have a rehash in progress at %u%%.\n", (count - rehash) * 100 / count);
|
||||
printf("You have a rehash in progress at %u%%.\n", muldiv(count - rehash, 100, count));
|
||||
} else {
|
||||
if (state->besthash != state->hash) {
|
||||
printf("No rehash is in progress, but for optimal performance one is recommended.\n");
|
||||
|
@ -426,7 +426,7 @@ const char* esc_tag(const char* str, char* buffer)
|
||||
|
||||
bail:
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Escape for log too long\n");
|
||||
log_fatal("Escape for log is too long\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -587,7 +587,7 @@ const char* esc_shell_multi(const char** str_map, unsigned str_max, char* buffer
|
||||
|
||||
bail:
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Escape for shell too long\n");
|
||||
log_fatal("Escape for shell is too long\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
@ -1456,7 +1456,7 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
||||
|
||||
if (blockstart > blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Error in the starting block %u. It's bigger than the parity size %u.\n", blockstart, blockmax);
|
||||
log_fatal("Error in the starting block %u. It is larger than the parity size %u.\n", blockstart, blockmax);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
@ -1485,7 +1485,7 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
||||
|
||||
/* if the file is too small */
|
||||
if (parityblocks < used_paritymax) {
|
||||
log_fatal("WARNING! The %s parity has data only %u blocks instead of %u.\n", lev_name(l), parityblocks, used_paritymax);
|
||||
log_fatal("WARNING! The %s parity has only %u blocks instead of %u.\n", lev_name(l), parityblocks, used_paritymax);
|
||||
}
|
||||
|
||||
/* keep the smallest parity number of blocks */
|
||||
|
@ -58,7 +58,7 @@ void state_touch(struct snapraid_state* state)
|
||||
/* get a random nanosecond value */
|
||||
if (randomize(&nano, sizeof(nano)) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Failed to get random values.\n");
|
||||
log_fatal("Failed to retrieve random values.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
@ -672,3 +672,22 @@ int lock_unlock(int f)
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
/* muldiv */
|
||||
|
||||
unsigned muldiv(uint64_t v, uint64_t mul, uint64_t div)
|
||||
{
|
||||
if (!div)
|
||||
return 0;
|
||||
|
||||
return (uint32_t)(v * mul / div);
|
||||
}
|
||||
|
||||
unsigned muldiv_upper(uint64_t v, uint64_t mul, uint64_t div)
|
||||
{
|
||||
if (!div)
|
||||
return 0;
|
||||
|
||||
return (uint32_t)((v * mul + div - 1) / div);
|
||||
}
|
||||
|
||||
|
@ -251,5 +251,10 @@ static inline int bit_vect_test(bit_vect_t* bit_vect, size_t off)
|
||||
return (bit_vect[off / BIT_VECT_SIZE] & mask) != 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
/****************************************************************************/
|
||||
/* muldiv */
|
||||
|
||||
unsigned muldiv(uint64_t v, uint64_t mul, uint64_t div);
|
||||
unsigned muldiv_upper(uint64_t v, uint64_t mul, uint64_t div);
|
||||
|
||||
#endif
|
||||
|
347
compile
347
compile
@ -1,347 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
1421
config.guess
vendored
1421
config.guess
vendored
File diff suppressed because it is too large
Load Diff
424
config.h.in
424
config.h.in
@ -1,424 +0,0 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if building universal (internal helper macro) */
|
||||
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||
|
||||
/* Define to 1 if you have the `access' function. */
|
||||
#undef HAVE_ACCESS
|
||||
|
||||
/* Define to 1 if inline assembly should be used. */
|
||||
#undef HAVE_ASSEMBLY
|
||||
|
||||
/* Define to 1 if avx2 is supported by the assembler. */
|
||||
#undef HAVE_AVX2
|
||||
|
||||
/* Define to 1 if you have the `backtrace' function. */
|
||||
#undef HAVE_BACKTRACE
|
||||
|
||||
/* Define to 1 if you have the `backtrace_symbols' function. */
|
||||
#undef HAVE_BACKTRACE_SYMBOLS
|
||||
|
||||
/* Define to 1 if you have the <blkid/blkid.h> header file. */
|
||||
#undef HAVE_BLKID_BLKID_H
|
||||
|
||||
/* Define to 1 if you have the `blkid_devno_to_devname' function. */
|
||||
#undef HAVE_BLKID_DEVNO_TO_DEVNAME
|
||||
|
||||
/* Define to 1 if you have the `blkid_get_tag_value' function. */
|
||||
#undef HAVE_BLKID_GET_TAG_VALUE
|
||||
|
||||
/* Define to 1 if you have the <byteswap.h> header file. */
|
||||
#undef HAVE_BYTESWAP_H
|
||||
|
||||
/* Define to 1 if you have the `clock_gettime' function. */
|
||||
#undef HAVE_CLOCK_GETTIME
|
||||
|
||||
/* Define to 1 if you have the declaration of `statfs', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_STATFS
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define to 1 if you have the <execinfo.h> header file. */
|
||||
#undef HAVE_EXECINFO_H
|
||||
|
||||
/* Define to 1 if you have the `fallocate' function. */
|
||||
#undef HAVE_FALLOCATE
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `ferror_unlocked' function. */
|
||||
#undef HAVE_FERROR_UNLOCKED
|
||||
|
||||
/* Define to 1 if you have the `flock' function. */
|
||||
#undef HAVE_FLOCK
|
||||
|
||||
/* Define to 1 if you have the `fnmatch' function. */
|
||||
#undef HAVE_FNMATCH
|
||||
|
||||
/* Define to 1 if you have the <fnmatch.h> header file. */
|
||||
#undef HAVE_FNMATCH_H
|
||||
|
||||
/* Define to 1 if you have the `fstatat' function. */
|
||||
#undef HAVE_FSTATAT
|
||||
|
||||
/* Define to 1 if you have the `fsync' function. */
|
||||
#undef HAVE_FSYNC
|
||||
|
||||
/* Define to 1 if you have the `ftruncate' function. */
|
||||
#undef HAVE_FTRUNCATE
|
||||
|
||||
/* Define to 1 if you have the `futimens' function. */
|
||||
#undef HAVE_FUTIMENS
|
||||
|
||||
/* Define to 1 if you have the `futimes' function. */
|
||||
#undef HAVE_FUTIMES
|
||||
|
||||
/* Define to 1 if you have the `futimesat' function. */
|
||||
#undef HAVE_FUTIMESAT
|
||||
|
||||
/* Define to 1 if you have the `getc_unlocked' function. */
|
||||
#undef HAVE_GETC_UNLOCKED
|
||||
|
||||
/* Define to 1 if you have the `getopt' function. */
|
||||
#undef HAVE_GETOPT
|
||||
|
||||
/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#undef HAVE_GETOPT_H
|
||||
|
||||
/* Define to 1 if you have the `getopt_long' function. */
|
||||
#undef HAVE_GETOPT_LONG
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <io.h> header file. */
|
||||
#undef HAVE_IO_H
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
|
||||
/* Define to 1 if you have the <linux/fiemap.h> header file. */
|
||||
#undef HAVE_LINUX_FIEMAP_H
|
||||
|
||||
/* Define to 1 if you have the <linux/fs.h> header file. */
|
||||
#undef HAVE_LINUX_FS_H
|
||||
|
||||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
#undef HAVE_LOCALTIME_R
|
||||
|
||||
/* Define to 1 if you have the `lutimes' function. */
|
||||
#undef HAVE_LUTIMES
|
||||
|
||||
/* Define to 1 if you have the `mach_absolute_time' function. */
|
||||
#undef HAVE_MACH_ABSOLUTE_TIME
|
||||
|
||||
/* Define to 1 if you have the <mach/mach_time.h> header file. */
|
||||
#undef HAVE_MACH_MACH_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <math.h> header file. */
|
||||
#undef HAVE_MATH_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#undef HAVE_MEMSET
|
||||
|
||||
/* Define to 1 if you have the `mkdir' function. */
|
||||
#undef HAVE_MKDIR
|
||||
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the `posix_fadvise' function. */
|
||||
#undef HAVE_POSIX_FADVISE
|
||||
|
||||
/* Define to 1 if you have the `pthread_create' function. */
|
||||
#undef HAVE_PTHREAD_CREATE
|
||||
|
||||
/* Define to 1 if you have the <pthread.h> header file. */
|
||||
#undef HAVE_PTHREAD_H
|
||||
|
||||
/* Define to 1 if you have the `sigaction' function. */
|
||||
#undef HAVE_SIGACTION
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#undef HAVE_SNPRINTF
|
||||
|
||||
/* Define to 1 if sse2 is supported by the assembler. */
|
||||
#undef HAVE_SSE2
|
||||
|
||||
/* Define to 1 if sse4.2 is supported by the assembler. */
|
||||
#undef HAVE_SSE42
|
||||
|
||||
/* Define to 1 if ssse3 is supported by the assembler. */
|
||||
#undef HAVE_SSSE3
|
||||
|
||||
/* Define to 1 if you have the `statfs' function. */
|
||||
#undef HAVE_STATFS
|
||||
|
||||
/* Define to 1 if you have the <stddef.h> header file. */
|
||||
#undef HAVE_STDDEF_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#undef HAVE_STRCHR
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the `strrchr' function. */
|
||||
#undef HAVE_STRRCHR
|
||||
|
||||
/* Define to 1 if you have the `strtoul' function. */
|
||||
#undef HAVE_STRTOUL
|
||||
|
||||
/* Define to 1 if `d_ino' is a member of `struct dirent'. */
|
||||
#undef HAVE_STRUCT_DIRENT_D_INO
|
||||
|
||||
/* Define to 1 if `d_type' is a member of `struct dirent'. */
|
||||
#undef HAVE_STRUCT_DIRENT_D_TYPE
|
||||
|
||||
/* Define to 1 if `f_fstypename' is a member of `struct statfs'. */
|
||||
#undef HAVE_STRUCT_STATFS_F_FSTYPENAME
|
||||
|
||||
/* Define to 1 if `f_type' is a member of `struct statfs'. */
|
||||
#undef HAVE_STRUCT_STATFS_F_TYPE
|
||||
|
||||
/* Define to 1 if `st_mtimensec' is a member of `struct stat'. */
|
||||
#undef HAVE_STRUCT_STAT_ST_MTIMENSEC
|
||||
|
||||
/* Define to 1 if `st_mtimespec.tv_nsec' is a member of `struct stat'. */
|
||||
#undef HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
|
||||
|
||||
/* Define to 1 if `st_mtim.tv_nsec' is a member of `struct stat'. */
|
||||
#undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
|
||||
|
||||
/* Define to 1 if `st_nlink' is a member of `struct stat'. */
|
||||
#undef HAVE_STRUCT_STAT_ST_NLINK
|
||||
|
||||
/* Define to 1 if you have the `sync_file_range' function. */
|
||||
#undef HAVE_SYNC_FILE_RANGE
|
||||
|
||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_DIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/file.h> header file. */
|
||||
#undef HAVE_SYS_FILE_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/mkdev.h> header file. */
|
||||
#undef HAVE_SYS_MKDEV_H
|
||||
|
||||
/* Define to 1 if you have the <sys/mount.h> header file. */
|
||||
#undef HAVE_SYS_MOUNT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define to 1 if you have the <sys/statfs.h> header file. */
|
||||
#undef HAVE_SYS_STATFS_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/sysmacros.h> header file. */
|
||||
#undef HAVE_SYS_SYSMACROS_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <sys/vfs.h> header file. */
|
||||
#undef HAVE_SYS_VFS_H
|
||||
|
||||
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `utimensat' function. */
|
||||
#undef HAVE_UTIMENSAT
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#undef HAVE_VSNPRINTF
|
||||
|
||||
/* Define to 1 if assertions should be disabled. */
|
||||
#undef NDEBUG
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# undef _POSIX_PTHREAD_SEMANTICS
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# undef _TANDEM_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
# undef WORDS_BIGENDIAN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Enable large inode numbers on Mac OS X 10.5. */
|
||||
#ifndef _DARWIN_USE_64_BIT_INODE
|
||||
# define _DARWIN_USE_64_BIT_INODE 1
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* Define to 1 if on MINIX. */
|
||||
#undef _MINIX
|
||||
|
||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||
this defined. */
|
||||
#undef _POSIX_1_SOURCE
|
||||
|
||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT32_T
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT64_T
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT8_T
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
/* Define to the type of a signed integer type of width exactly 8 bits if such
|
||||
a type exists and the standard includes do not define it. */
|
||||
#undef int8_t
|
||||
|
||||
/* Define to `long int' if <sys/types.h> does not define. */
|
||||
#undef off_t
|
||||
|
||||
/* Define to the equivalent of the C99 'restrict' keyword, or to
|
||||
nothing if this is not supported. Do not define if restrict is
|
||||
supported directly. */
|
||||
#undef restrict
|
||||
/* Work around a bug in Sun C++: it does not support _Restrict or
|
||||
__restrict__, even though the corresponding Sun C compiler ends up with
|
||||
"#define restrict _Restrict" or "#define restrict __restrict__" in the
|
||||
previous line. Perhaps some future version of Sun C++ will work with
|
||||
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
|
||||
#if defined __SUNPRO_CC && !defined __RESTRICT
|
||||
# define _Restrict
|
||||
# define __restrict__
|
||||
#endif
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#undef ssize_t
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 32 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint32_t
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 64 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint64_t
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 8 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint8_t
|
||||
|
||||
/* Define to empty if the keyword `volatile' does not work. Warning: valid
|
||||
code using `volatile' can become incorrect without. Disable with care. */
|
||||
#undef volatile
|
1807
config.sub
vendored
1807
config.sub
vendored
File diff suppressed because it is too large
Load Diff
@ -12,7 +12,7 @@ dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AC_CHECK_PROG([VALGRIND],[valgrind],[valgrind],[])
|
||||
AC_CHECK_PROG([WINE],[wine],[wine],[])
|
||||
AC_CHECK_PROG([WINE],[wine64],[wine64],[])
|
||||
AC_CHECK_PROG([SDE],[sde],[sde],[])
|
||||
AC_CHECK_PROG([ADVD2],[advd2],[advd2],[])
|
||||
AM_CONDITIONAL(HAVE_ADVD2, [test x"$ADVD2" != x])
|
||||
|
697
debian/changelog
vendored
697
debian/changelog
vendored
@ -1,693 +1,46 @@
|
||||
snapraid (11.6-0) UNRELEASED; urgency=medium
|
||||
snapraid (12.4-1) unstable; urgency=medium
|
||||
|
||||
* Bump
|
||||
* Bump
|
||||
* New upstream version 12.4
|
||||
|
||||
-- Mario Fetka <mario.fetka@gmail.com> Fri, 11 Sep 2020 13:42:38 +0200
|
||||
-- Mo Zhou <lumin@debian.org> Mon, 27 Jan 2025 00:21:49 -0500
|
||||
|
||||
snapraid (11.2-0tikhonov1) xenial; urgency=medium
|
||||
snapraid (12.3-1) unstable; urgency=medium
|
||||
|
||||
[11.2 2017/12]
|
||||
* Fixed recognition of NTFS hardlinks. They behave differently than
|
||||
standard Unix hardlinks and this could result in SnapRAID reporting
|
||||
internal inconsistency errors for detecting links to the same file
|
||||
with different metadata attributes.
|
||||
* More efficient 'pool' command that updates only the links
|
||||
that need to be updated. This ensures that no change is
|
||||
done, avoiding to trigger a directory rescan of other programs.
|
||||
* In Linux use by default the advise "discard" mode instead of "flush".
|
||||
This avoids to swap-out the other process memory, leaving the system
|
||||
more responsive.
|
||||
* Changed the fallocate() use to work better with Btrfs with parity disks.
|
||||
* Changed the --test-io-stats screen to print the file name in process
|
||||
for each disk.
|
||||
* New upstream version 12.3
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Wed, 18 Jul 2018 19:44:46 +0400
|
||||
-- Mo Zhou <lumin@debian.org> Thu, 15 Feb 2024 13:56:08 -0500
|
||||
|
||||
snapraid (11.1-0tikhonov1~trusty) trusty; urgency=medium
|
||||
snapraid (12.2-1) unstable; urgency=medium
|
||||
|
||||
[11.1 2017/05]
|
||||
* Fixed the check command to correctly ignore errors on unused parity.
|
||||
This was broken in version 9.0.
|
||||
* Allow increasing the number of parity splits of existing parity.
|
||||
* Fixed quoting when printing in Linux. This fixes the UTF-8 screen
|
||||
output. Windows version was not affected.
|
||||
* Fixed recognition of 'hashsize' in the configuration file.
|
||||
The previous incorrect 'hash_size' is still supported for backward
|
||||
compatibility.
|
||||
* Fixed building in platforms that don't provide major/minor definitions
|
||||
in sys/types.h.
|
||||
* When creating 'pool' symbolic links, set their time as the linked files.
|
||||
* Added support for the Windows 10 symbolic link unprivileged creation,
|
||||
using SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE.
|
||||
* Windows binaries built with gcc 4.9.4 using the MXE cross compiler at
|
||||
commit ae56efa2b23a793b0146508bfef33027cdb09fd2 with targets
|
||||
i686-w64-mingw32 and x86_64-w64-mingw32 and optimization -O2.
|
||||
* New upstream version 12.2
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Mon, 28 Aug 2017 12:41:29 +0400
|
||||
-- Mo Zhou <lumin@debian.org> Thu, 08 Sep 2022 21:54:28 -0400
|
||||
|
||||
snapraid (11.0-0tikhonov1~trusty) trusty; urgency=medium
|
||||
snapraid (12.1-1) unstable; urgency=medium
|
||||
|
||||
[11.0 2016/11]
|
||||
* Added support for splitting the parity in multiple partitions. You
|
||||
can now specify multiple files for a single parity. As soon a file
|
||||
cannot grow anymore, the next one starts growing.
|
||||
In the configuration file, just put more files in the same 'parity'
|
||||
line, separated by , (comma).
|
||||
Note that if this feature is used, the saved content file won't be
|
||||
read by older SnapRAID versions.
|
||||
In Windows, 256 MB are left free in each disk to avoid the warning
|
||||
about full disks.
|
||||
* Added a new 'hashsize' configuration option. It could be useful in
|
||||
systems with low memory, to reduce the memory usage.
|
||||
Note that if this feature is used, the saved content file won't be
|
||||
read by older SnapRAID versions.
|
||||
* In Linux added the missing support for Btrfs file-systems. Note that
|
||||
to have full support you need also the 'libblkid' library, otherwise
|
||||
you won't get the UUIDs.
|
||||
* In screen messages don't print the disk directory in file path. You
|
||||
can control the format with the test option:
|
||||
--test-fmt file|disk|path.
|
||||
* In Windows allows to use the escape char '^' to handle file patterns
|
||||
containing real characters matching the globbing '*?[]' ones. In Unix
|
||||
it was already possible to do the same escaping with '\'.
|
||||
* Added a new -R, --force-realloc option to reallocate all the
|
||||
parity information keeping the precomputed hash.
|
||||
This is the previous -F, --force-full that instead now maintains the
|
||||
same parity organization and just recomputes it.
|
||||
* Added test options for selecting the file advise mode to use:
|
||||
--test-io-advise-none for standard mode
|
||||
--test-io-advise-sequential advise sequential access (Linux/Windows)
|
||||
--test-io-advise-flush flush cache after every operation (Linux)
|
||||
--test-io-advise-flush-window flush cache every 8 MB (Linux)
|
||||
--test-io-advise-discard discard cache after every operation (Linux)
|
||||
--test-io-advise-discard-window discard cache every 8 MB (Linux)
|
||||
--test-io-advise-direct use direct/unbuffered mode (Linux/Windows)
|
||||
The new default mode is 'flush' in Linux (before it was 'sequential'),
|
||||
and 'sequential' in Windows (like before).
|
||||
* For Seagate SMR (Shingled Magnetic Recording) ignore the SMART
|
||||
attribute Command_Timeout 188 as not reliable.
|
||||
* Fixed running in Windows platforms that miss the RtlGenRandom()
|
||||
function.
|
||||
* Added the --test-io-cache=1 option to disable the multi-thread IO
|
||||
mode.
|
||||
* New upstream version 12.1
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Thu, 01 Dec 2016 16:25:21 +0400
|
||||
-- Mo Zhou <lumin@debian.org> Sun, 30 Jan 2022 12:47:06 -0500
|
||||
|
||||
snapraid (10.0-0tikhonov1~trusty) trusty; urgency=medium
|
||||
snapraid (12.0-1) unstable; urgency=medium
|
||||
|
||||
[ 10.0 2016/02 ]
|
||||
* Boosts the speed of the 'sync' and 'scrub' commands with a new
|
||||
multi-thread implementation. It uses one thread for each disk,
|
||||
dedicated exclusively to read-ahead data and parity and to
|
||||
write-behind parity. This maximizes the data throughput keeping
|
||||
disks always busy.
|
||||
You can control the number of blocks to cache with the option
|
||||
--test-io-cache=NUMBER, where the number is between 3 and 128.
|
||||
The default is 8 MiB of blocks.
|
||||
You can show run-time stats during the process with the
|
||||
--test-io-stats option. You will see a graph with the number of
|
||||
cached blocks, and a graph with the wait time percentage for all the
|
||||
disks and computations.
|
||||
* The -h, --pre-hash command, saves the content file only after having
|
||||
verified all the hashes. This allows recovering of moved files in
|
||||
case a silent error is found during the hash verification check.
|
||||
* Allows to use the -d, --filter-disk option in the 'up' and 'down'
|
||||
commands.
|
||||
* Allows to run the 'smart' command without a configuration file.
|
||||
In such case it operates on all the disks of the machine.
|
||||
* In the configuration file 'data' is now a synonymous of 'disk'.
|
||||
* Adds the 'touch' command intended to arbitrarily set all the zero
|
||||
sub-second timestamps. This improves the SnapRAID capabilities to
|
||||
identify files. The 'status' command recommends to run 'touch' if
|
||||
required.
|
||||
* Restores the functionality of the -D, --force-device option when used
|
||||
to workaround the use of the same disk for two logical data drives
|
||||
when running the 'fix' command.
|
||||
* Uses a correct shell quoting in the example commands that involve
|
||||
files.
|
||||
* The minimum Windows version supported is now Windows Vista. This is
|
||||
required to use the native Windows thread support for the new
|
||||
multi-thread implementation. If you need to run on Windows XP, you
|
||||
have to stick on SnapRAID 9.x.
|
||||
[ Debian Janitor ]
|
||||
* Trim trailing whitespace.
|
||||
* Set upstream metadata fields: Repository, Repository-Browse.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Sat, 05 Mar 2016 17:44:53 +0400
|
||||
[ Mo Zhou ]
|
||||
* New upstream version 12.0 (Closes: #995324)
|
||||
|
||||
snapraid (9.3-0tikhonov1~trusty) trusty; urgency=medium
|
||||
-- Mo Zhou <lumin@debian.org> Sat, 08 Jan 2022 11:49:08 -0500
|
||||
|
||||
[ 9.3 2016/01 ]
|
||||
* Fixes an invalid assumption in the copy detection mechanism that
|
||||
could result in an internal inconsistency, and with the impossibility
|
||||
to run the 'sync' and 'diff' commands.
|
||||
This was triggered by a very specific pattern of identical files.
|
||||
At least three of them, with one already in the parity, and at a
|
||||
higher disk number than the others that should be instead new ones.
|
||||
This had no bad effect, if not preventing the 'sync' command to run.
|
||||
A workaround was to just run 'sync' one time with the -N,
|
||||
--force-nocopy option to disable the copy detection.
|
||||
* Restored the -O2 optimization option for Windows binaries, as -Og has
|
||||
a too big performance penality.
|
||||
snapraid (11.5-1) unstable; urgency=medium
|
||||
|
||||
[ 9.2 2016/01 ]
|
||||
* Fixes support for symlinks pointing to an empty target. Before they
|
||||
were only partially supported, and their presence could result in a
|
||||
content file not readable.
|
||||
This also disables multi-thread content write, as this was the issue
|
||||
we tried to detect with this feature, and it doesn't provide a
|
||||
performance advantage. Content verification is instead still multi
|
||||
thread.
|
||||
* Autorename disks using the matching UUID. To rename a disk you can
|
||||
now change directly the name in the configuration file, and run a
|
||||
'sync' command.
|
||||
* Improves the physical offset ordering for the Btrfs file-system,
|
||||
correctly detecting files that have not a physical offset, for
|
||||
whatever reason.
|
||||
* Adds UUID support to Btrfs file-systems. It's present only if the
|
||||
'libblkid' development library is available on the system.
|
||||
Usually this requires to install the libblkid-dev or libblkid-devel
|
||||
package.
|
||||
* Added a new --no-warnings option to disable some repetitive warnings
|
||||
that could be annoying to power users.
|
||||
* Improves the error reporting, printing a complete stack trace, that
|
||||
can be used to track down bugs more easily.
|
||||
For this reason the Windows binaries are now built with optimization
|
||||
option -Og, instead than -O2.
|
||||
* New upstream version 11.5
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Tue, 02 Feb 2016 12:59:13 +0400
|
||||
-- Mo Zhou <lumin@debian.org> Sat, 25 Jul 2020 15:20:50 +0800
|
||||
|
||||
snapraid (9.1-0tikhonov1~trusty) trusty; urgency=medium
|
||||
snapraid (11.4-1~exp1) experimental; urgency=medium
|
||||
|
||||
[ 9.1 2015/11 ]
|
||||
* Fixes a bug when reading a content file with a deleted entry bigger
|
||||
than 4 GB. This was a regression introduced in version 9.0 that
|
||||
could result in the impossibility to read a valid content file,
|
||||
after a deletion of a file bigger than 4 GB in the array.
|
||||
If this happened to you, just upgrading to 9.1 fixes the issue, and
|
||||
it allows you to continue to work.
|
||||
Note that this bug only prevented to run 9.0, but your data was still
|
||||
protected and could have been recovered using the versions 8.1 or 9.1.
|
||||
* In Windows disables the file zero check requiring the --force-zero
|
||||
option. This check is intended for possible case using ext3/4 in Linux,
|
||||
and there is no evidence that in Windows it's possible at all.
|
||||
* Windows binaries built with gcc 4.9.3 using the MXE cross compiler at
|
||||
commit 62bcdbee56e87c81f1faa105b8777a5879d4e2e with targets
|
||||
i686-w64-mingw32 and x86_64-w64-mingw32 and optimization -O2.
|
||||
* Initial release. (Closes: #960816)
|
||||
|
||||
[ 9.0 2015/11 ]
|
||||
* Fixes an invalid assumption that could happen when using the
|
||||
-e, --filter-error option with "fix" or "check".
|
||||
This was triggered by a very specific pattern of fragmented files
|
||||
and bad blocks combination, not so easy to reproduce.
|
||||
This had no bad effect, if not preventing the command to run.
|
||||
* Drastically reduces the memory usage. For each block, it now
|
||||
uses 17 bytes of memory, instead of the previous 28 bytes
|
||||
(for 32 bit) or 36 bytes (for 64 bit).
|
||||
This could result is a memory saving of up the 50%.
|
||||
* The -p, --plan option (old --percentage) can be used to
|
||||
define a scrub plan: "new", "bad" and "full".
|
||||
The "new" plan scrubs all the new synced blocks not yet scrubbed.
|
||||
This allows to verify as early as possible that the written
|
||||
parity during sync is really correct. You can use the "status"
|
||||
command to show the amount blocks not yet scrubbed.
|
||||
The "bad" plan scrubs only bad blocks.
|
||||
The "full" plan scrubs all blocks.
|
||||
* The graph in the "status" command now show scrubbed blocks
|
||||
with '*', and synced, but not yet scrubbed, blocks with 'o'.
|
||||
Note that when upgrading from a previous version, all blocks
|
||||
are assumed scrubbed the first time.
|
||||
* Content files are now written asyncronously from different
|
||||
threads to avoid the unfortunate condition that a memory
|
||||
error affects all of them in the same way.
|
||||
After writing, they are read again to verify their CRC.
|
||||
This is done to ensure thay they are really OK, even in the
|
||||
case of the worst possible silent errors.
|
||||
* Extends the -D, --force-device option to ignore more
|
||||
erroneous conditions in the 'fix' command, like unaccessible
|
||||
disks, or disks sharing the same physical device.
|
||||
* Extends the -d, --filter-disk option to allow to filter also
|
||||
by parity disk.
|
||||
* Extends the -h, --pre-hash option to also verify moved and
|
||||
copied files into the array before running a 'sync'.
|
||||
* Updates 'best' RAID functions for recent Atom CPUs.
|
||||
* Validates filters specifications rejecting relative paths.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Tue, 01 Dec 2015 23:50:52 +0400
|
||||
|
||||
snapraid (8.1-0tikhonov1~trusty) trusty; urgency=medium
|
||||
|
||||
[ 8.1 2015/05 ]
|
||||
* Fix build issues in generic Unix platforms, including Mac OS X.
|
||||
* The "diff" command returns with error code 2 if a "sync" is
|
||||
required, to differentiate with the generic error code 1.
|
||||
* Reduced the effect of SMART attribute 193 on the failure
|
||||
probability to avoid some false positive reports.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Sun, 17 May 2015 23:29:11 +0400
|
||||
|
||||
snapraid (8.0-0tikhonov1~trusty) trusty; urgency=medium
|
||||
|
||||
[ 8.0 2015/04 ]
|
||||
* Allows "sync" and "scrub" to continue after the first bunch of disk
|
||||
errors. Blocks with errors are marked as bad, and you can fix them
|
||||
with the "fix -e" command.
|
||||
The fix is expected to force the disk firmware to reallocate the
|
||||
bad sector, likely fixing the problem.
|
||||
You can control the number of allowed errors with the new
|
||||
-L, --error-limit option. The default is 100.
|
||||
* The -e, --filter-error option doesn't write anymore fixes to
|
||||
unsynced files. This helps in case you are running it on a not
|
||||
synced array, removing the risk to revert some files to an old state.
|
||||
* The -e, --filter-error option is now optimal and reads only the
|
||||
minimal amount of data necessary to fix the errors.
|
||||
* The "diff" command returns with an error code if a "sync" is
|
||||
required.
|
||||
* Adds new "smart" command to print a SMART report of the array.
|
||||
* Adds new "up" and "down" commands to spin up and down the disks of
|
||||
the array.
|
||||
* Adds new "devices" command to print the devices associations in
|
||||
the array.
|
||||
* Changes the log handling. If no log file is specified, all the
|
||||
warnings and not fatal errors messages goes to stderr. If a log file
|
||||
is specified, only fatal error messages are printed on the screen.
|
||||
You can control the amount of informative messages on stdout with
|
||||
the -q, --quiet and -v, --verbose options, that can be specified
|
||||
multiple times to be more quiet or verbose.
|
||||
* In the "status" command the "Wasted" column now shows a negative
|
||||
number for the amount of space that you can still waste without
|
||||
filling up the parity.
|
||||
* In the "status" and others commands we now use GB instead of GiB,
|
||||
when referring to disk space.
|
||||
* Renames the -s and -t options to -S and -B as they are intended to
|
||||
be manual only operations.
|
||||
* Windows binary built with gcc 4.8.1 using the MXE cross compiler 2.23,
|
||||
with targets i686-w64-mingw32 and x86_64-w64-mingw32. Before the x86
|
||||
target was i686-pc-mingw32.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Thu, 30 Apr 2015 23:01:55 +0400
|
||||
|
||||
snapraid (7.1-0tikhonov1~precise) precise; urgency=medium
|
||||
|
||||
[ 7.1 2015/01 ]
|
||||
* In 'scrub' and 'sync' detects and reports Input/Output errors
|
||||
separately from generic file system errors.
|
||||
* In 'diff' doesn't print the "add" entry if a "copy" one is already
|
||||
printed.
|
||||
* Fixes build with old compilers in the x64 platforms [Leigh Phillips].
|
||||
* Fixes out-of-dir builds [Christoph Junghans].
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Wed, 11 Mar 2015 20:36:58 +0400
|
||||
|
||||
snapraid (7.0-0tikhonov2~precise) precise; urgency=medium
|
||||
|
||||
[ 7.0 2014/11 ]
|
||||
* In 'check' and 'fix' the array is scanned to find any moved files
|
||||
that could be used to recover missing data. Files are identified by
|
||||
timestamp, and then they are recognized also if moved to a different
|
||||
disk. Note that even if there are false positive they are identified
|
||||
checking the hash, so they have not effect, besides making the
|
||||
process a little slower. To disable this new behaviour you can use
|
||||
the -N, --force-nocopy option.
|
||||
* The -i, --import command now identifies files by timestamp making it
|
||||
very fast in importing directories.
|
||||
* More detailed 'status' report with single disk stats and free space
|
||||
available.
|
||||
* A lot faster directory listing for Windows.
|
||||
* Adds AVX2 support to improve parity generation speed.
|
||||
* Prints the time spent waiting for each disk also in 'scrub'.
|
||||
* The CPU usage, speed and ETA estimations are now based on the last 100
|
||||
seconds rather than from the start.
|
||||
* Keeps track of the UUID of the parity disks to check them before
|
||||
operating.
|
||||
* Windows binary built with gcc 4.8.1 using the MXE cross compiler 2.23.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Thu, 27 Nov 2014 00:36:59 +0400
|
||||
|
||||
snapraid (6.2-0tikhonov1~precise) precise; urgency=low
|
||||
|
||||
[ 6.2 2014/5 ]
|
||||
* Fixed the regression test when run as root.
|
||||
* Added a new heuristic to detect file copies. Now a file is assumed
|
||||
to be a copy if name, size and nanosecond timestamp are matching,
|
||||
but if the nanosecond part of the timestamp is 0, it requires
|
||||
the full path matching and not only the name.
|
||||
* Added the -N, --force-nocopy option to disable completely
|
||||
the copy detection. SnapRAID also suggests to use this option
|
||||
in the error message of a data mismatch if likely caused by the
|
||||
copy detection.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Wed, 16 Jul 2014 01:01:09 +0400
|
||||
|
||||
snapraid (6.1-0tikhonov1~precise) precise; urgency=high
|
||||
|
||||
[ 6.1 2014/4 ]
|
||||
* Fix build and regression test in Mac OS X.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Tue, 22 Apr 2014 00:22:07 +0400
|
||||
|
||||
snapraid (6.0-0tikhonov1~precise) precise; urgency=low
|
||||
|
||||
[ 6.0 2014/3 ]
|
||||
* In "sync", even if a silent error is found, continue to update
|
||||
the parity if it's possible to correct the error.
|
||||
Note that the block will be marked bad, and the data
|
||||
will be fixed only at the next "fix -e" call.
|
||||
But any new data added will be protected if you are using
|
||||
enough parity to fix both the silent error and at least
|
||||
another potential error.
|
||||
* Detect copied files from one disk to another and reuse the already
|
||||
computed hash information to validate them in "sync".
|
||||
Files are assumed copied if they matches the name, size and timestamp.
|
||||
* For "sync", added a new -h, --pre-hash option to run a preliminary
|
||||
hashing step for all the new files to ensure to detect silent errors
|
||||
caused by the heavy machine usage of the parity computation.
|
||||
* In "fix", if a previous fixing attempt was made resulting in a
|
||||
.unrecoverable file, uses this file as starting point for the
|
||||
new attempt.
|
||||
* In the log file name allows the use of the '>>', %D, %T modifiers
|
||||
to select append mode, and to insert the date and time in the name.
|
||||
* The options -p, --percentage and -o, --older-than now keep their
|
||||
default value even if the other one is specified.
|
||||
* Moved the .lock file in the same dir of the first specified content
|
||||
file. This avoid to spin-up the parity disks in all commands.
|
||||
* The "diff", "list", "dup", "status" and "pool" commands don't access
|
||||
anymore the parity disks that can now stay powered down.
|
||||
* The default configuration file in Windows is now searched in the same
|
||||
directory where the snapraid.exe file resides.
|
||||
* New source code organization. The RAID engine is now
|
||||
an external component usable also in other projects.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Fri, 11 Apr 2014 02:43:52 +0400
|
||||
|
||||
snapraid (5.3-0tikhonov1~precise) precise; urgency=low
|
||||
|
||||
[ 5.3 2014/3 ]
|
||||
* Don't warn about UUID changed if it's for an empty disk.
|
||||
* Fixed the number of blocks that scrub has to process when
|
||||
selecting a high percentage of the array.
|
||||
* Removed duplicate recovery attempts in synced state.
|
||||
|
||||
[ 5.2 2013/12 ]
|
||||
* If a disk changes UUID, automatically disable the inode
|
||||
recognition, because this is likely a new filesystem with
|
||||
all the inodes reassigned, and we don't want to risk a false
|
||||
positive when searching for inode/timestamp/size.
|
||||
* Allow to run a fix command with disks that doesn't need to be
|
||||
fixed mounted as read-only.
|
||||
* After a failed sync, always reallocates new files with a not
|
||||
yet computed parity to ensure to minimize the parity usage,
|
||||
if some other file is deleted in the meantime.
|
||||
* Doesn't count empty dirs as files in the diff counters.
|
||||
* Added a new "share" configuration option to allow to share
|
||||
in the network the pool directory also in Windows.
|
||||
* Fixed build problems in OpenBSD due the old assembler.
|
||||
* Fixed build problems in platforms different than x86.
|
||||
|
||||
[ 5.1 2013/12 ]
|
||||
* Fixed a potential crash if a file is deleted during a "sync/scrub".
|
||||
This is a problem introduced in version 5.0 due new logging.
|
||||
If happened to you to have a crash in sync, you don't need to
|
||||
take any special action, just run "sync" again.
|
||||
* Restored the functionality of -C, --gen-conf command.
|
||||
* Prints the files with duplicate physical offset if the
|
||||
-v, --verbose option is specified.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Tue, 11 Mar 2014 18:56:46 +0400
|
||||
|
||||
snapraid (5.0-0tikhonov1~precise) precise; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
[ Upstream changelog 4.4 ]
|
||||
* Added support for up to six levels of parity.
|
||||
* Added a specific and faster triple parity format for CPUs that
|
||||
don't support SSSE3 instructions like ARM and AMD Phenom, Athlon
|
||||
and Opteron.
|
||||
* Faster RAID5 and RAID6 implementation for ARM 64 bit CPUs.
|
||||
* If a silent error is found during a "sync" command, directly marks
|
||||
the block as bad like in "scrub", without stopping the the "sync"
|
||||
process.
|
||||
* Sort files by inode when listing the directory. This improves
|
||||
the scanning performance.
|
||||
* For files with changes only in some blocks, updates the parity
|
||||
only for blocks that really are changed.
|
||||
This improves the performance in sync for modified files.
|
||||
* Added a new "list" command to see the stored list of files.
|
||||
* Removed the detailed list of errors from the screen output.
|
||||
To get it you must explicitely use the -l, --log option.
|
||||
It's now too detailed for the screen, because it contains a lot
|
||||
of info.
|
||||
* Changed the output format of some commands to make it similar
|
||||
at the new "list" one.
|
||||
* Reduced memory usage removing some unnecessary allocations.
|
||||
* Added a memory test on the memory buffers used in sync/scrub/check/fix
|
||||
before using them.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Mon, 25 Nov 2013 15:58:37 +0400
|
||||
|
||||
snapraid (4.4-0tikhonov1~precise) precise; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
[ Upstream changelog 4.4 ]
|
||||
* Relaxed the check about small parity files, to allow to recover after a
|
||||
failed sync before resizing the parity files.
|
||||
|
||||
[ Upstream changelog 4.3 ]
|
||||
* Fixed the scrub command with the -p0 option. Now it really scrubs only the
|
||||
blocks marked as bad and not the full array.
|
||||
|
||||
[ Upstream changelog 4.2 ]
|
||||
* Fixed the wrong warning about physical offsets not supported caused by files
|
||||
not having a real offset because too small. For example, in NTFS it's possible
|
||||
to store such files in the MFT. It's just a cosmetic change, and not a
|
||||
functional one.
|
||||
* Remove unexpected 'Restore' entries in the diff output when dealing with
|
||||
filesystem without persistent inodes like NTFS in Linux.
|
||||
* Added support for filenames containing newlines. This happens in Mac OS X.
|
||||
|
||||
[ Upstream changelog 4.1 ]
|
||||
* If the underline filesystem doesn't support the FIEMAP command, automatically
|
||||
fallback to use FIBMAP for sorting files.
|
||||
* Fixed the import of content files from previous version of SnapRAID that are
|
||||
the result of an incomplete sync.
|
||||
* Added a new -C, --gen-conf option to generate a dummy configuration file from
|
||||
the info in the content file. Just in case that you lose everything, except
|
||||
the content file.
|
||||
* At the end of sync/scrub/check/fix prints "Everything OK" if no error was found.
|
||||
This should make clear that everything is really OK.
|
||||
|
||||
[ Upstream changelog 4.0 ]
|
||||
* New 'scrub' command to periodically check the oldest blocks for silent
|
||||
errors without the need to scan the whole array.
|
||||
* New 'status' command to check the fragmentation, the last check time
|
||||
distribution, and the silent error status of the array.
|
||||
* Added the new Spooky hash. It's faster in 64 bit architectures. To
|
||||
convert you can use the new 'rehash' command.
|
||||
* Changed to a binary content file to improve speed and reduce size.
|
||||
* Removed the --find-by-name, -N option. Now it always searches
|
||||
by name if a file is not found searching by inode, automatically
|
||||
reassigning inodes in restored files without needing to sync
|
||||
again the file. This happens only if the file has the same path, size
|
||||
and timestamp at nanosecond precision.
|
||||
* Added a hash seed to make harder intentional collision attacks.
|
||||
* When inserting files for the first time, sort them by their physical
|
||||
address to improve read performance.
|
||||
* Optimized the cache use for the all the RAID computations.
|
||||
This improves a lot the RAID performance.
|
||||
* Better selection of the RAID6 implementation for different CPUs.
|
||||
* Added RAID5/RAID6 mmx and sse2 implementations with unrolling by 4.
|
||||
They are a little faster than the previous unroll by 2.
|
||||
* Added a lock file to avoid multiple running instances on the same array.
|
||||
The file is named as parity file adding the .lock extension.
|
||||
There is also the undocumented --test-skip-lock to avoid to check it.
|
||||
* Automatically ignores, with warning, mount points inside the array
|
||||
directory tree.
|
||||
* Changes the 'dup' output format to include the size of each duplicate file.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Fri, 01 Nov 2013 00:04:46 +0400
|
||||
|
||||
snapraid (3.2-0tikhonov1~precise) precise; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
[ Upstream changelog 3.2 ]
|
||||
* Fix a directory creation problem in Windows when the "disk" option points to
|
||||
the root directory of a drive. Now SnapRAID won't complain about the
|
||||
inability to create such directory.
|
||||
If you encouter this problem when trying to recover your data, just upgrade
|
||||
to this version, and you'll be able to complete the recovering process.
|
||||
No need to upgrade for platforms different than Windows.
|
||||
|
||||
[ Upstream changelog 3.1 ]
|
||||
* Direct use of Windows API for disk access to improve error reporting.
|
||||
* If the 'fix' process is aborted, it removes all the new files partially
|
||||
recovered, to allow to reuse again the '-m, --filter-missing' flag.
|
||||
* In Windows don't exclude anymore system files. Only system directories are
|
||||
excluded.
|
||||
* In Windows applies filters in case insensitive way.
|
||||
* The Windows binaries are now built with gcc 4.7.2.
|
||||
* Reduced memory occupation for hardlinks and directories.
|
||||
* In 'dup' don't list file with 0 size.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Fri, 09 Aug 2013 17:43:06 +0400
|
||||
|
||||
snapraid (3.0-0tikhonov1~precise) precise; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
[ Upstream changelog ]
|
||||
* Added pooling support with the new 'pool' command. It creates a virtual
|
||||
view of the array using symbolic links pointing to the original files.
|
||||
* Added a new -m, --filter-missing option that allow to undelete files,
|
||||
without checking/fixing the others.
|
||||
* Added a new -i, --import option to automatically import deleted files
|
||||
when fixing.
|
||||
* Added a new -l, --log option to save to disk the detailed log.
|
||||
* Added support also for hardlinks and empty directories.
|
||||
* Added support to save symlinks to files in Windows. Note that only the
|
||||
symlink is saved and not the linked file.
|
||||
Symlinks to dirs and junctions are still not supported in Windows.
|
||||
* Files without read permission generate an error instead of a warning.
|
||||
You now must explicitely exclude them in the configuration file with
|
||||
exclusion rules.
|
||||
* In 'check' and 'fix', if verbose is enabled, prints the result for each
|
||||
processed file.
|
||||
* Added an UUID check to detect when a disk is replaced, and to prevent
|
||||
unwanted disk swaps.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Wed, 03 Apr 2013 13:01:53 +0400
|
||||
|
||||
snapraid (2.1-0tikhonov1~precise) precise; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
[ Upstream changelog ]
|
||||
* Checks for wrong empty fields in the configuration file.
|
||||
* Filter rules for files are not anymore applied to directories.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Mon, 28 Jan 2013 02:10:28 +0400
|
||||
|
||||
snapraid (2.0-0tikhonov1~precise) precise; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
[ Upstream changelog ]
|
||||
* Added a new -a option to make the 'check' command to only check file hashes
|
||||
without checking the parity data.
|
||||
* Added a new -d option to filter by disk name.
|
||||
* The file modification time is now saved using nanosecond precision.
|
||||
This allows to restore the exact modification time in 'fix'.
|
||||
The new 'content' files written with this version are not backward
|
||||
compatible, but it's still possible to read the old 'content' format.
|
||||
* Fixed hard-links automatic exclusion. All the hardlinks after the first one
|
||||
are now correctly ignored.
|
||||
* If it isn't possible to grow a parity file, prints the list of files
|
||||
outside the maximum size allocated.
|
||||
* Autosave isn't triggered if we are near the end of the 'sync' process.
|
||||
* Before starting a 'sync', we wait for two seconds, to workaround the FAT
|
||||
limitation of having two seconds modification time precision.
|
||||
This a safe measure to be 100% sure to always detect file changes.
|
||||
* Always fill the memory after allocating it to avoid the OOM (Out Of Memory)
|
||||
killer in Linux.
|
||||
* Fixed compilation in Solaris/OpenIndiana for lacking both futimes()
|
||||
and futimens().
|
||||
* Now 'sync' ensures that the parity files are not too small to contain the
|
||||
just loaded data.
|
||||
* Removed the '-H,--filter-nohidden' option. It doesn't make sense to
|
||||
have it as command line option.
|
||||
You must use the 'nohidden' option in the configuration file.
|
||||
* When opening files in read-only mode, also specify the noatime flag,
|
||||
to avoid to update the file access time.
|
||||
* Exclude rules for files are now also applied to directories.
|
||||
This allows to excludes some file/directory without the need to call
|
||||
the stat() function on them.
|
||||
* The -N, --find-by-name option also ignores the nanosecond part of
|
||||
timestamps to work with copy programs not supporting nanoseconds.
|
||||
* Fixed deduplicated files handling in Windows Server 2012.
|
||||
* Removed MD5 support.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Thu, 06 Dec 2012 00:38:20 +0400
|
||||
|
||||
snapraid (1.13-0tikhonov1~precise) precise; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
[ Upstream changelog ]
|
||||
* Fixed a Segmentation Fault when checking/fixing if there are three or
|
||||
more errors in a specific block.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Mon, 05 Nov 2012 16:31:22 +0400
|
||||
|
||||
snapraid (1.12-0tikhonov1~precise) precise; urgency=low
|
||||
|
||||
* New upstream release 1.12.
|
||||
|
||||
[ Upstream changelog ]
|
||||
* Fixed file renaming in Windows during a 'fix' command. This is only a
|
||||
Windows issue, no reason to upgrade for other platforms.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Thu, 20 Sep 2012 13:13:40 +0400
|
||||
|
||||
snapraid (1.11-0tikhonov1~precise) precise; urgency=high
|
||||
|
||||
* New upstream release 1.11.
|
||||
|
||||
[ Upstream changelog ]
|
||||
* Fixed again directories inclusion. Exclusion rules for directories were ignored.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Mon, 09 Jul 2012 19:06:01 +0400
|
||||
|
||||
snapraid (1.10-0tikhonov1~precise) precise; urgency=low
|
||||
|
||||
* New upstream release 1.10.
|
||||
|
||||
[ Upstream changelog ]
|
||||
* Fixed directory inclusion, in case the last rule is an "include" one.
|
||||
* Fixed very long paths in Windows. We now always use the special '\\?' prefix to remove the 260 chars limitation.
|
||||
* If a file is excluded, it prints explicitely which attribute caused the exclusion.
|
||||
* Automatically excludes also the temporary copy of content file, the one with the ".tmp" extension.
|
||||
* Avoid the Windows system to go in automatic sleep mode when running.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Sun, 01 Jul 2012 21:43:16 +0400
|
||||
|
||||
snapraid (1.9-0tikhonov1~precise) precise; urgency=low
|
||||
|
||||
* New upstream release 1.9.
|
||||
|
||||
[ Upstream changelog ]
|
||||
* Implemented a more sophisticated recovering in case a harddisk failure happens during a 'sync'
|
||||
command. When using RAID6 it improves the chances of recovering data after an aborted 'sync'.
|
||||
* Fixed the count of new files.
|
||||
* Added a new 'autosave' configuration option to save the intermediate 'sync' state.
|
||||
* Supported filesystems with read requests returning less data than requested.
|
||||
* In Windows ensures that the disk serial number is not zero.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Tue, 10 Apr 2012 17:31:51 +0400
|
||||
|
||||
snapraid (1.8-0tikhonov1~oneiric) oneiric; urgency=low
|
||||
|
||||
* New upstream release 1.8.
|
||||
|
||||
Upstream changelog:
|
||||
* Added a new "dup" command to find all the duplicate files.
|
||||
* Added a new option "--filter-nohidden" to exclude hidden files.
|
||||
* Faster and parallel writing of content files.
|
||||
* The example configuration files now put the content files in the data
|
||||
disks instead than in the parity disks.
|
||||
* Added a checksum at the content file to ensure its integrity.
|
||||
* Using fallocate() instead posix_fallocate() to avoid the very slow
|
||||
posix_fallocate() fallback of writing the whole file.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Sat, 17 Mar 2012 19:15:07 +0400
|
||||
|
||||
snapraid (1.7-0tikhonov2~oneiric) oneiric; urgency=low
|
||||
|
||||
* Fixed example snapraid.conf.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Sat, 24 Dec 2011 01:28:39 +0400
|
||||
|
||||
snapraid (1.7-0tikhonov1~oneiric) oneiric; urgency=low
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Maxim Tikhonov <flaterichd@gmail.com> Thu, 22 Dec 2011 19:46:17 +0400
|
||||
-- Mo Zhou <lumin@debian.org> Fri, 22 May 2020 00:42:52 +0800
|
||||
|
1
debian/compat
vendored
1
debian/compat
vendored
@ -1 +0,0 @@
|
||||
7
|
57
debian/control
vendored
57
debian/control
vendored
@ -1,28 +1,43 @@
|
||||
Source: snapraid
|
||||
Section: utils
|
||||
Priority: extra
|
||||
Maintainer: Maxim Tikhonov <flaterichd@gmail.com>
|
||||
Build-Depends: debhelper (>= 7.0.0), autotools-dev
|
||||
Standards-Version: 3.9.2
|
||||
Homepage: http://snapraid.sourceforge.net/
|
||||
Section: admin
|
||||
Homepage: https://github.com/amadvance/snapraid
|
||||
Priority: optional
|
||||
Standards-Version: 4.5.0
|
||||
Vcs-Git: https://salsa.debian.org/debian/snapraid.git
|
||||
Vcs-Browser: https://salsa.debian.org/debian/snapraid
|
||||
Maintainer: Mo Zhou <lumin@debian.org>
|
||||
Rules-Requires-Root: no
|
||||
Build-Depends: debhelper-compat (= 13),
|
||||
|
||||
Package: snapraid
|
||||
Architecture: any
|
||||
Depends:
|
||||
${shlibs:Depends},
|
||||
${misc:Depends}
|
||||
Description: SnapRAID is a backup program for disk arrays.
|
||||
SnapRAID is a backup program for disk arrays.
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends},
|
||||
Pre-Depends: ${misc:Pre-Depends},
|
||||
Description: backup program for disk arrays
|
||||
SnapRAID is a backup program for disk arrays. It stores parity
|
||||
information of your data and it recovers from up to six disk
|
||||
failures.
|
||||
.
|
||||
SnapRAID stores redundancy information in the disk array, and it allows recovering from up to two disk failures.
|
||||
SnapRAID is mainly targeted for a home media center, where you
|
||||
have a lot of big files that rarely change.
|
||||
.
|
||||
SnapRAID is mainly targeted for a home media center, where you have a lot of big files that rarely change.
|
||||
Beside the ability to recover from disk failures, the other
|
||||
features of SnapRAID are:
|
||||
.
|
||||
Beside the ability to recover from disk failures, the other features of SnapRAID are:
|
||||
- You can start using SnapRAID with already filled disks.
|
||||
- The disks of the array can have different sizes.
|
||||
- You can add more disks at any time.
|
||||
- If you accidentally delete some files in a disk, you can recover them.
|
||||
- If more than two disks fail, you lose the data only on the failed disks. All the data in the other disks is safe.
|
||||
- It doesn't lock-in your data. You can stop using SnapRAID at any time without the need to reformat or move data.
|
||||
- All your data is hashed to ensure data integrity and avoid silent corruption.
|
||||
* You can use disk already filled with files, without the need to
|
||||
reformat them. You will access them like now.
|
||||
* All your data is hashed to ensure data integrity and to avoid
|
||||
silent corruption.
|
||||
* If the failed disks are too many to allow a recovery,
|
||||
you lose the data only on the failed disks.
|
||||
All the data in the other disks is safe.
|
||||
* If you accidentally delete some files in a disk, you can
|
||||
recover them.
|
||||
* The disks can have different sizes.
|
||||
* You can add disks at any time.
|
||||
* It doesn't lock-in your data. You can stop using SnapRAID at any
|
||||
time without the need to reformat or move data.
|
||||
* To access a file, only a single disk needs to spin, saving power and
|
||||
producing less noise.
|
||||
.
|
||||
The official site of SnapRAID is: http://www.snapraid.it/
|
||||
|
168
debian/copyright
vendored
168
debian/copyright
vendored
@ -1,28 +1,65 @@
|
||||
Format: http://dep.debian.net/deps/dep5
|
||||
Name: snapraid
|
||||
Upstream-Name: snapraid
|
||||
Maintainer: Maxim Tikhonov <flaterichd@gmail.com>
|
||||
Source: http://sourceforge.net/projects/snapraid/files/
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Source: https://github.com/amadvance/snapraid
|
||||
|
||||
Files: *
|
||||
Copyright: 2011 Andrea Mazzoleni <amadvance@users.sourceforge.net>
|
||||
License: GPL-3
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License can be found in `/usr/share/common-licenses/GPL-3'.
|
||||
cmdline/*
|
||||
Copyright: 2011-2016, Andrea Mazzoleni
|
||||
License: GPL-3.0+
|
||||
|
||||
Files: raid/*
|
||||
Copyright: 2013-2015, Andrea Mazzoleni
|
||||
License: GPL-2.0+
|
||||
|
||||
Files: tommyds/*
|
||||
Copyright: 2010, Andrea Mazzoleni.
|
||||
License: BSD-2-Clause
|
||||
|
||||
Files: cmdline/fnmatch.c
|
||||
cmdline/fnmatch.h
|
||||
Copyright: 1991, 92, 93, 96, 97, 98, 99 Free Software Foundation, Inc.
|
||||
License: LGPL-2.0+
|
||||
|
||||
Files: cmdline/metro.c
|
||||
Copyright: 2019, Andrea Mazzoleni
|
||||
License: Apache-2.0 AND GPL-3.0+
|
||||
|
||||
Files: cmdline/murmur3.c
|
||||
Copyright: 2011, Andrea Mazzoleni
|
||||
License: GPL-3.0+ AND public-domain
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2011 Maxim Tikhonov <flaterichd@gmail.com>
|
||||
License: GPL-2+
|
||||
Copyright: 2020, Mo Zhou <lumin@debian.org>
|
||||
License: LGPL-3.0+
|
||||
|
||||
##############################################################################
|
||||
|
||||
License: public-domain
|
||||
This is free and unencumbered software released into the public domain.
|
||||
.
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
.
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
.
|
||||
For more information, please refer to <http://unlicense.org/>
|
||||
|
||||
License: GPL-2.0+
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
@ -38,3 +75,92 @@ License: GPL-2+
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
||||
|
||||
License: GPL-3.0+
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
|
||||
|
||||
License: Apache-2.0
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
.
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
.
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
.
|
||||
On Debian systems, the complete text of the Apache version 2.0 license
|
||||
can be found in "/usr/share/common-licenses/Apache-2.0".
|
||||
|
||||
License: BSD-2-Clause
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HOLDERS OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
License: LGPL-2.0+
|
||||
This package is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
.
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the complete text of the GNU Lesser General
|
||||
Public License can be found in "/usr/share/common-licenses/LGPL-2.0".
|
||||
|
||||
License: LGPL-3.0+
|
||||
This package is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 3 of the License, or (at your option) any later version.
|
||||
.
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the complete text of the GNU Lesser General
|
||||
Public License can be found in "/usr/share/common-licenses/LGPL-3".
|
||||
|
9
debian/docs
vendored
9
debian/docs
vendored
@ -1,9 +0,0 @@
|
||||
AUTHORS
|
||||
CHECK
|
||||
COPYING
|
||||
HISTORY
|
||||
INSTALL
|
||||
README
|
||||
TODO
|
||||
snapraid.conf.example
|
||||
snapraid.txt
|
2
debian/install
vendored
2
debian/install
vendored
@ -1,2 +0,0 @@
|
||||
debian/snapraid.conf etc
|
||||
snapraid usr/bin
|
1
debian/manpage.1
vendored
1
debian/manpage.1
vendored
@ -1 +0,0 @@
|
||||
../snapraid.1
|
18
debian/rules
vendored
18
debian/rules
vendored
@ -1,21 +1,5 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
#
|
||||
# This file was originally written by Joey Hess and Craig Small.
|
||||
# As a special exception, when this file is copied by dh-make into a
|
||||
# dh-make output file, you may use that output file without restriction.
|
||||
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||
#
|
||||
# Modified to make a template file for a multi-binary package with separated
|
||||
# build-arch and build-indep targets by Bill Allombert 2001
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
# This has to be exported to make some magic below work.
|
||||
export DH_OPTIONS
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
86
debian/snapraid.conf
vendored
86
debian/snapraid.conf
vendored
@ -1,86 +0,0 @@
|
||||
# Example configuration for snapraid
|
||||
|
||||
# Defines the file to use as parity storage
|
||||
# It must NOT be in a data disk
|
||||
# Format: "parity FILE_PATH"
|
||||
parity /mnt/diskp/snapraid.parity
|
||||
|
||||
# Defines the files to use as additional parity storage.
|
||||
# If specified, they enable the multiple failures protection
|
||||
# from two to six level of parity.
|
||||
# To enable, uncomment one parity file for each level of extra
|
||||
# protection required. Start from 2-parity, and follow in order.
|
||||
# It must NOT be in a data disk
|
||||
# Format: "X-parity FILE_PATH"
|
||||
#2-parity /mnt/diskq/snapraid.2-parity
|
||||
#3-parity /mnt/diskr/snapraid.3-parity
|
||||
#4-parity /mnt/disks/snapraid.4-parity
|
||||
#5-parity /mnt/diskt/snapraid.5-parity
|
||||
#6-parity /mnt/disku/snapraid.6-parity
|
||||
|
||||
# Defines the files to use as content list
|
||||
# You can use multiple specification to store more copies
|
||||
# You must have least one copy for each parity file plus one. Some more don't hurt
|
||||
# They can be in the disks used for data, parity or boot,
|
||||
# but each file must be in a different disk
|
||||
# Format: "content FILE_PATH"
|
||||
content /var/snapraid.content
|
||||
content /mnt/disk1/snapraid.content
|
||||
content /mnt/disk2/snapraid.content
|
||||
|
||||
# Defines the data disks to use
|
||||
# The name and mount point association is relevant for parity, do not change it
|
||||
# WARNING: Adding here your /home, /var or /tmp disks is NOT a good idea!
|
||||
# SnapRAID is better suited for files that rarely changes!
|
||||
# Format: "disk DISK_NAME DISK_MOUNT_POINT"
|
||||
data d1 /mnt/disk1/
|
||||
data d2 /mnt/disk2/
|
||||
data d3 /mnt/disk3/
|
||||
|
||||
# Excludes hidden files and directories (uncomment to enable).
|
||||
#nohidden
|
||||
|
||||
# Defines files and directories to exclude
|
||||
# Remember that all the paths are relative at the mount points
|
||||
# Format: "exclude FILE"
|
||||
# Format: "exclude DIR/"
|
||||
# Format: "exclude /PATH/FILE"
|
||||
# Format: "exclude /PATH/DIR/"
|
||||
exclude *.unrecoverable
|
||||
exclude /tmp/
|
||||
exclude /lost+found/
|
||||
|
||||
# Defines the block size in kibi bytes (1024 bytes) (uncomment to enable).
|
||||
# Default value is 256 -> 256 kibi bytes -> 262144 bytes
|
||||
# Format: "blocksize SIZE_IN_KiB"
|
||||
#blocksize 256
|
||||
|
||||
# Automatically save the state when syncing after the specified amount
|
||||
# of GB processed (uncomment to enable).
|
||||
# This option is useful to avoid to restart from scratch long 'sync'
|
||||
# commands interrupted by a machine crash.
|
||||
# It also improves the recovering if a disk break during a 'sync'.
|
||||
# Default value is 0, meaning disabled.
|
||||
# Format: "autosave SIZE_IN_GB"
|
||||
#autosave 500
|
||||
|
||||
# Defines the pooling directory where the virtual view of the disk
|
||||
# array is created using the "pool" command (uncomment to enable).
|
||||
# The files are not really copied here, but just linked using
|
||||
# symbolic links.
|
||||
# This directory must be outside the array.
|
||||
# Format: "pool DIR"
|
||||
#pool /pool
|
||||
|
||||
# Defines a custom smartctl command to obtain the SMART attributes
|
||||
# for each disk. This may be required for RAID controllers and for
|
||||
# some USB disk that cannot be autodetected.
|
||||
# In the specified options, the "%s" string is replaced by the device name.
|
||||
# Refers at the smartmontools documentation about the possible options:
|
||||
# RAID -> https://www.smartmontools.org/wiki/Supported_RAID-Controllers
|
||||
# USB -> https://www.smartmontools.org/wiki/Supported_USB-Devices
|
||||
#smartctl d1 -d sat %s
|
||||
#smartctl d2 -d usbjmicron %s
|
||||
#smartctl parity -d areca,1/1 /dev/sg0
|
||||
#smartctl 2-parity -d areca,2/1 /dev/sg0
|
||||
|
3
debian/upstream/metadata
vendored
Normal file
3
debian/upstream/metadata
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
Repository: https://github.com/amadvance/snapraid.git
|
||||
Repository-Browse: https://github.com/amadvance/snapraid
|
7
debian/watch
vendored
7
debian/watch
vendored
@ -1,2 +1,5 @@
|
||||
version=3
|
||||
https://github.com/amadvance/snapraid/releases .*snapraid-([0-9.]*\.[0-9.]*).tar.gz
|
||||
version=4
|
||||
opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%snapraid-$1.tar.gz%" \
|
||||
https://github.com/amadvance/snapraid/tags \
|
||||
(?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate
|
||||
|
||||
|
501
install-sh
501
install-sh
@ -1,501 +0,0 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2013-12-25.23; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
doit=${DOITPROG-}
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
16
makecov.sh
Executable file
16
makecov.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Run the Coverage test
|
||||
#
|
||||
|
||||
make distclean
|
||||
|
||||
if ! ./configure --enable-coverage --enable-sde; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! make lcov_reset check lcov_capture lcov_html; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
47
makedist.sh
Executable file
47
makedist.sh
Executable file
@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
CHECK=check
|
||||
DEBUG=
|
||||
|
||||
if test "x$1" = "x-f"; then
|
||||
CHECK=all
|
||||
fi
|
||||
|
||||
if test "x$1" = "x-d"; then
|
||||
DEBUG=--enable-debug
|
||||
fi
|
||||
|
||||
make distclean
|
||||
|
||||
# Reconfigure (with force) to get the latest revision from git
|
||||
autoreconf -f
|
||||
|
||||
if ! ./configure.windows-x86 $DEBUG; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! make distwindows-x86 distclean; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! ./configure.windows-x64 $DEBUG; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! make -j4 $CHECK; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! make distwindows-x64 distclean; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! ./configure ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! make dist; then
|
||||
exit 1
|
||||
fi
|
||||
|
67
makesan.sh
Executable file
67
makesan.sh
Executable file
@ -0,0 +1,67 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Run all the Sanitizers available
|
||||
#
|
||||
|
||||
# Compiler to use
|
||||
COMPILER=clang
|
||||
|
||||
# Options for configure
|
||||
# --disable-asm
|
||||
# Inline assembly is not supported by the Sanitizers
|
||||
# --without-blkid
|
||||
# External libraries are not supported by the Sanitizers
|
||||
OPTIONS="--disable-asm --without-blkid"
|
||||
|
||||
# Source directory
|
||||
SOURCE=`pwd`
|
||||
|
||||
# Dest directory
|
||||
DEST=`mktemp -d`
|
||||
|
||||
make distclean
|
||||
|
||||
cd $DEST
|
||||
|
||||
# AddressSanitizer
|
||||
if ! $SOURCE/configure --enable-asan $OPTIONS CC=$COMPILER; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! make check distclean; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# UndefinedBehaviourSanitizer
|
||||
if ! $SOURCE/configure --enable-ubsan $OPTIONS CC=$COMPILER; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! make check distclean; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# MemorySanitizer
|
||||
if ! $SOURCE/configure --enable-msan $OPTIONS CC=$COMPILER; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! make check distclean; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ThreadSanitizer
|
||||
if ! $SOURCE/configure --enable-tsan $OPTIONS CC=$COMPILER; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! make check distclean; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $SOURCE
|
||||
|
||||
if ! ./configure; then
|
||||
exit 1
|
||||
fi
|
||||
|
30
makescan.sh
Executable file
30
makescan.sh
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Run the Coverity Scan static analyzer
|
||||
#
|
||||
|
||||
rm -r cov-int
|
||||
|
||||
make distclean
|
||||
|
||||
# Reconfigure (with force) to get the latest revision from git
|
||||
autoreconf -f
|
||||
|
||||
if ! ./configure ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export PATH=$PATH:contrib/cov-analysis-linux64-2020.09/bin
|
||||
|
||||
if ! cov-build --dir cov-int make; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
REVISION=`sh autover.sh`
|
||||
|
||||
tar czf snapraid-$REVISION.tgz cov-int
|
||||
|
||||
rm -r cov-int
|
||||
|
||||
echo snapraid-$REVISION.tgz ready to upload to https://scan.coverity.com/projects/1986/builds/new
|
||||
|
5
makesum.sh
Executable file
5
makesum.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo sha256 > CHECKSUMS
|
||||
cd archive && sha256sum * | sort -k 2 -V >> ../CHECKSUMS
|
||||
|
63
maketest.sh
Executable file
63
maketest.sh
Executable file
@ -0,0 +1,63 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Run all the Coverage and Valgrind tests
|
||||
#
|
||||
|
||||
# Source directory
|
||||
SOURCE=`pwd`
|
||||
|
||||
# Dest directory
|
||||
DEST=`mktemp -d`
|
||||
|
||||
make distclean
|
||||
|
||||
cd $DEST
|
||||
|
||||
# Coverage
|
||||
if ! $SOURCE/configure --enable-coverage --enable-sde; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! make lcov_reset check lcov_capture lcov_html; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp -a cov $SOURCE/cov
|
||||
|
||||
if ! make distclean; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Valgrind
|
||||
if ! $SOURCE/configure --enable-valgrind; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! make check distclean; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Helgrind
|
||||
if ! $SOURCE/configure --enable-helgrind; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! make check distclean; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Drd
|
||||
if ! $SOURCE/configure --enable-drd; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! make check distclean; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $SOURCE
|
||||
|
||||
if ! ./configure; then
|
||||
exit 1
|
||||
fi
|
||||
|
215
missing
215
missing
@ -1,215 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
|
||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
31
raid/COPYING
31
raid/COPYING
@ -1,8 +1,8 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
@ -225,7 +225,7 @@ impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
@ -278,8 +278,8 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -303,16 +303,16 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
@ -335,5 +335,6 @@ necessary. Here is a sample; alter the names:
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
||||
|
428
raid/mktables.c
Normal file
428
raid/mktables.c
Normal file
@ -0,0 +1,428 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Andrea Mazzoleni
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* Multiplication a*b in GF(2^8).
|
||||
*/
|
||||
static uint8_t gfmul(uint8_t a, uint8_t b)
|
||||
{
|
||||
uint8_t v;
|
||||
|
||||
v = 0;
|
||||
while (b) {
|
||||
if ((b & 1) != 0)
|
||||
v ^= a;
|
||||
|
||||
if ((a & 0x80) != 0) {
|
||||
a <<= 1;
|
||||
a ^= 0x1d;
|
||||
} else {
|
||||
a <<= 1;
|
||||
}
|
||||
|
||||
b >>= 1;
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inversion (1/a) in GF(2^8).
|
||||
*/
|
||||
uint8_t gfinv[256];
|
||||
|
||||
/**
|
||||
* Number of parities.
|
||||
* This is the number of rows of the generator matrix.
|
||||
*/
|
||||
#define PARITY 6
|
||||
|
||||
/**
|
||||
* Number of disks.
|
||||
* This is the number of columns of the generator matrix.
|
||||
*/
|
||||
#define DISK (257 - PARITY)
|
||||
|
||||
/**
|
||||
* Setup the Cauchy matrix used to generate the parity.
|
||||
*/
|
||||
static void set_cauchy(uint8_t *matrix)
|
||||
{
|
||||
int i, j;
|
||||
uint8_t inv_x, y;
|
||||
|
||||
/*
|
||||
* The first row of the generator matrix is formed by all 1.
|
||||
*
|
||||
* The generator matrix is an Extended Cauchy matrix built from
|
||||
* a Cauchy matrix adding at the top a row of all 1.
|
||||
*
|
||||
* Extending a Cauchy matrix in this way maintains the MDS property
|
||||
* of the matrix.
|
||||
*
|
||||
* For example, considering a generator matrix of 4x6 we have now:
|
||||
*
|
||||
* 1 1 1 1 1 1
|
||||
* - - - - - -
|
||||
* - - - - - -
|
||||
* - - - - - -
|
||||
*/
|
||||
for (i = 0; i < DISK; ++i)
|
||||
matrix[0 * DISK + i] = 1;
|
||||
|
||||
/*
|
||||
* Second row is formed with powers 2^i, and it's the first
|
||||
* row of the Cauchy matrix.
|
||||
*
|
||||
* Each element of the Cauchy matrix is in the form 1/(x_i + y_j)
|
||||
* where all x_i and y_j must be different for any i and j.
|
||||
*
|
||||
* For the first row with j=0, we choose x_i = 2^-i and y_0 = 0
|
||||
* and we obtain a first row formed as:
|
||||
*
|
||||
* 1/(x_i + y_0) = 1/(2^-i + 0) = 2^i
|
||||
*
|
||||
* with 2^-i != 0 for any i
|
||||
*
|
||||
* In the example we get:
|
||||
*
|
||||
* x_0 = 1
|
||||
* x_1 = 142
|
||||
* x_2 = 71
|
||||
* x_3 = 173
|
||||
* x_4 = 216
|
||||
* x_5 = 108
|
||||
* y_0 = 0
|
||||
*
|
||||
* with the matrix:
|
||||
*
|
||||
* 1 1 1 1 1 1
|
||||
* 1 2 4 8 16 32
|
||||
* - - - - - -
|
||||
* - - - - - -
|
||||
*/
|
||||
inv_x = 1;
|
||||
for (i = 0; i < DISK; ++i) {
|
||||
matrix[1 * DISK + i] = inv_x;
|
||||
inv_x = gfmul(2, inv_x);
|
||||
}
|
||||
|
||||
/*
|
||||
* The rest of the Cauchy matrix is formed choosing for each row j
|
||||
* a new y_j = 2^j and reusing the x_i already assigned in the first
|
||||
* row obtaining :
|
||||
*
|
||||
* 1/(x_i + y_j) = 1/(2^-i + 2^j)
|
||||
*
|
||||
* with 2^-i + 2^j != 0 for any i,j with i>=0,j>=1,i+j<255
|
||||
*
|
||||
* In the example we get:
|
||||
*
|
||||
* y_1 = 2
|
||||
* y_2 = 4
|
||||
*
|
||||
* with the matrix:
|
||||
*
|
||||
* 1 1 1 1 1 1
|
||||
* 1 2 4 8 16 32
|
||||
* 244 83 78 183 118 47
|
||||
* 167 39 213 59 153 82
|
||||
*/
|
||||
y = 2;
|
||||
for (j = 0; j < PARITY - 2; ++j) {
|
||||
inv_x = 1;
|
||||
for (i = 0; i < DISK; ++i) {
|
||||
uint8_t x = gfinv[inv_x];
|
||||
|
||||
matrix[(j + 2) * DISK + i] = gfinv[y ^ x];
|
||||
inv_x = gfmul(2, inv_x);
|
||||
}
|
||||
|
||||
y = gfmul(2, y);
|
||||
}
|
||||
|
||||
/*
|
||||
* Finally we adjust the matrix multiplying each row for
|
||||
* the inverse of the first element in the row.
|
||||
*
|
||||
* Also this operation maintains the MDS property of the matrix.
|
||||
*
|
||||
* Resulting in:
|
||||
*
|
||||
* 1 1 1 1 1 1
|
||||
* 1 2 4 8 16 32
|
||||
* 1 245 210 196 154 113
|
||||
* 1 187 166 215 7 106
|
||||
*/
|
||||
for (j = 0; j < PARITY - 2; ++j) {
|
||||
uint8_t f = gfinv[matrix[(j + 2) * DISK]];
|
||||
|
||||
for (i = 0; i < DISK; ++i)
|
||||
matrix[(j + 2) * DISK + i] = gfmul(matrix[(j + 2) * DISK + i], f);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup the Power matrix used to generate the parity.
|
||||
*/
|
||||
static void set_power(uint8_t *matrix)
|
||||
{
|
||||
unsigned i;
|
||||
uint8_t v;
|
||||
|
||||
v = 1;
|
||||
for (i = 0; i < DISK; ++i)
|
||||
matrix[0 * DISK + i] = v;
|
||||
|
||||
v = 1;
|
||||
for (i = 0; i < DISK; ++i) {
|
||||
matrix[1 * DISK + i] = v;
|
||||
v = gfmul(2, v);
|
||||
}
|
||||
|
||||
v = 1;
|
||||
for (i = 0; i < DISK; ++i) {
|
||||
matrix[2 * DISK + i] = v;
|
||||
v = gfmul(0x8e, v);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Next power of 2.
|
||||
*/
|
||||
static unsigned np(unsigned v)
|
||||
{
|
||||
--v;
|
||||
v |= v >> 1;
|
||||
v |= v >> 2;
|
||||
v |= v >> 4;
|
||||
v |= v >> 8;
|
||||
v |= v >> 16;
|
||||
++v;
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
uint8_t v;
|
||||
int i, j, k, p;
|
||||
uint8_t matrix[PARITY * 256];
|
||||
|
||||
printf("/*\n");
|
||||
printf(" * Copyright (C) 2013 Andrea Mazzoleni\n");
|
||||
printf(" *\n");
|
||||
printf(" * This program is free software: you can redistribute it and/or modify\n");
|
||||
printf(" * it under the terms of the GNU General Public License as published by\n");
|
||||
printf(" * the Free Software Foundation, either version 2 of the License, or\n");
|
||||
printf(" * (at your option) any later version.\n");
|
||||
printf(" *\n");
|
||||
printf(" * This program is distributed in the hope that it will be useful,\n");
|
||||
printf(" * but WITHOUT ANY WARRANTY; without even the implied warranty of\n");
|
||||
printf(" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n");
|
||||
printf(" * GNU General Public License for more details.\n");
|
||||
printf(" */\n");
|
||||
printf("\n");
|
||||
|
||||
printf("#include \"internal.h\"\n");
|
||||
printf("\n");
|
||||
|
||||
/* a*b */
|
||||
printf("const uint8_t __aligned(256) raid_gfmul[256][256] =\n");
|
||||
printf("{\n");
|
||||
for (i = 0; i < 256; ++i) {
|
||||
printf("\t{\n");
|
||||
for (j = 0; j < 256; ++j) {
|
||||
if (j % 8 == 0)
|
||||
printf("\t\t");
|
||||
v = gfmul(i, j);
|
||||
if (v == 1)
|
||||
gfinv[i] = j;
|
||||
printf("0x%02x,", (unsigned)v);
|
||||
if (j % 8 == 7)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" ");
|
||||
}
|
||||
printf("\t},\n");
|
||||
}
|
||||
printf("};\n\n");
|
||||
|
||||
/* 2^a */
|
||||
printf("const uint8_t __aligned(256) raid_gfexp[256] =\n");
|
||||
printf("{\n");
|
||||
v = 1;
|
||||
for (i = 0; i < 256; ++i) {
|
||||
if (i % 8 == 0)
|
||||
printf("\t");
|
||||
printf("0x%02x,", v);
|
||||
v = gfmul(v, 2);
|
||||
if (i % 8 == 7)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" ");
|
||||
}
|
||||
printf("};\n\n");
|
||||
|
||||
/* 1/a */
|
||||
printf("const uint8_t __aligned(256) raid_gfinv[256] =\n");
|
||||
printf("{\n");
|
||||
printf("\t/* note that the first element is not significative */\n");
|
||||
for (i = 0; i < 256; ++i) {
|
||||
if (i % 8 == 0)
|
||||
printf("\t");
|
||||
if (i == 0)
|
||||
v = 0;
|
||||
else
|
||||
v = gfinv[i];
|
||||
printf("0x%02x,", v);
|
||||
if (i % 8 == 7)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" ");
|
||||
}
|
||||
printf("};\n\n");
|
||||
|
||||
/* power matrix */
|
||||
set_power(matrix);
|
||||
|
||||
printf("/**\n");
|
||||
printf(" * Power matrix used to generate parity.\n");
|
||||
printf(" * This matrix is valid for up to %u parity with %u data disks.\n", 3, DISK);
|
||||
printf(" *\n");
|
||||
for (p = 0; p < 3; ++p) {
|
||||
printf(" *");
|
||||
for (i = 0; i < DISK; ++i)
|
||||
printf(" %02x", matrix[p * DISK + i]);
|
||||
printf("\n");
|
||||
}
|
||||
printf(" */\n");
|
||||
printf("const uint8_t __aligned(256) raid_gfvandermonde[%u][256] =\n", 3);
|
||||
printf("{\n");
|
||||
for (p = 0; p < 3; ++p) {
|
||||
printf("\t{\n");
|
||||
for (i = 0; i < DISK; ++i) {
|
||||
if (i % 8 == 0)
|
||||
printf("\t\t");
|
||||
printf("0x%02x,", matrix[p * DISK + i]);
|
||||
if (i != DISK - 1) {
|
||||
if (i % 8 == 7)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" ");
|
||||
}
|
||||
}
|
||||
printf("\n\t},\n");
|
||||
}
|
||||
printf("};\n\n");
|
||||
|
||||
/* cauchy matrix */
|
||||
set_cauchy(matrix);
|
||||
|
||||
printf("/**\n");
|
||||
printf(" * Cauchy matrix used to generate parity.\n");
|
||||
printf(" * This matrix is valid for up to %u parity with %u data disks.\n", PARITY, DISK);
|
||||
printf(" *\n");
|
||||
for (p = 0; p < PARITY; ++p) {
|
||||
printf(" *");
|
||||
for (i = 0; i < DISK; ++i)
|
||||
printf(" %02x", matrix[p * DISK + i]);
|
||||
printf("\n");
|
||||
}
|
||||
printf(" */\n");
|
||||
printf("const uint8_t __aligned(256) raid_gfcauchy[%u][256] =\n", PARITY);
|
||||
printf("{\n");
|
||||
for (p = 0; p < PARITY; ++p) {
|
||||
printf("\t{\n");
|
||||
for (i = 0; i < DISK; ++i) {
|
||||
if (i % 8 == 0)
|
||||
printf("\t\t");
|
||||
printf("0x%02x,", matrix[p * DISK + i]);
|
||||
if (i != DISK - 1) {
|
||||
if (i % 8 == 7)
|
||||
printf("\n");
|
||||
else
|
||||
printf(" ");
|
||||
}
|
||||
}
|
||||
printf("\n\t},\n");
|
||||
}
|
||||
printf("};\n\n");
|
||||
|
||||
printf("#ifdef CONFIG_X86\n");
|
||||
printf("/**\n");
|
||||
printf(" * PSHUFB tables for the Cauchy matrix.\n");
|
||||
printf(" *\n");
|
||||
printf(" * Indexes are [DISK][PARITY - 2][LH].\n");
|
||||
printf(" * Where DISK is from 0 to %u, PARITY from 2 to %u, LH from 0 to 1.\n", DISK - 1, PARITY - 1);
|
||||
printf(" */\n");
|
||||
printf("const uint8_t __aligned(256) raid_gfcauchypshufb[%u][%u][2][16] =\n", DISK, np(PARITY - 2));
|
||||
printf("{\n");
|
||||
for (i = 0; i < DISK; ++i) {
|
||||
printf("\t{\n");
|
||||
for (p = 2; p < PARITY; ++p) {
|
||||
printf("\t\t{\n");
|
||||
for (j = 0; j < 2; ++j) {
|
||||
printf("\t\t\t{ ");
|
||||
for (k = 0; k < 16; ++k) {
|
||||
v = gfmul(matrix[p * DISK + i], k);
|
||||
if (j == 1)
|
||||
v = gfmul(v, 16);
|
||||
printf("0x%02x", (unsigned)v);
|
||||
if (k != 15)
|
||||
printf(", ");
|
||||
}
|
||||
printf(" },\n");
|
||||
}
|
||||
printf("\t\t},\n");
|
||||
}
|
||||
printf("\t},\n");
|
||||
}
|
||||
printf("};\n");
|
||||
printf("#endif\n\n");
|
||||
|
||||
printf("#ifdef CONFIG_X86\n");
|
||||
printf("/**\n");
|
||||
printf(" * PSHUFB tables for generic multiplication.\n");
|
||||
printf(" *\n");
|
||||
printf(" * Indexes are [MULTIPLIER][LH].\n");
|
||||
printf(" * Where MULTIPLIER is from 0 to 255, LH from 0 to 1.\n");
|
||||
printf(" */\n");
|
||||
printf("const uint8_t __aligned(256) raid_gfmulpshufb[256][2][16] =\n");
|
||||
printf("{\n");
|
||||
for (i = 0; i < 256; ++i) {
|
||||
printf("\t{\n");
|
||||
for (j = 0; j < 2; ++j) {
|
||||
printf("\t\t{ ");
|
||||
for (k = 0; k < 16; ++k) {
|
||||
v = gfmul(i, k);
|
||||
if (j == 1)
|
||||
v = gfmul(v, 16);
|
||||
printf("0x%02x", (unsigned)v);
|
||||
if (k != 15)
|
||||
printf(", ");
|
||||
}
|
||||
printf(" },\n");
|
||||
}
|
||||
printf("\t},\n");
|
||||
}
|
||||
printf("};\n");
|
||||
printf("#endif\n\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
64
raid/raid.c
64
raid/raid.c
@ -20,50 +20,50 @@
|
||||
* the primitive polynomial x^8 + x^4 + x^3 + x^2 + 1 (285 decimal), and
|
||||
* supporting up to six parity levels.
|
||||
*
|
||||
* For RAID5 and RAID6 it works as as described in the H. Peter Anvin's
|
||||
* For RAID5 and RAID6, it works as described in H. Peter Anvin's
|
||||
* paper "The mathematics of RAID-6" [1]. Please refer to this paper for a
|
||||
* complete explanation.
|
||||
*
|
||||
* To support triple parity, it was first evaluated and then dropped, an
|
||||
* To support triple parity, it was first evaluated and then dropped; an
|
||||
* extension of the same approach, with additional parity coefficients set
|
||||
* as powers of 2^-1, with equations:
|
||||
*
|
||||
* P = sum(Di)
|
||||
* Q = sum(2^i * Di)
|
||||
* R = sum(2^-i * Di) with 0<=i<N
|
||||
* R = sum(2^-i * Di) with 0 <= i < N
|
||||
*
|
||||
* This approach works well for triple parity and it's very efficient,
|
||||
* This approach works well for triple parity and is very efficient
|
||||
* because we can implement very fast parallel multiplications and
|
||||
* divisions by 2 in GF(2^8).
|
||||
*
|
||||
* It's also similar at the approach used by ZFS RAIDZ3, with the
|
||||
* It is also similar to the approach used by ZFS RAIDZ3, with the
|
||||
* difference that ZFS uses powers of 4 instead of 2^-1.
|
||||
*
|
||||
* Unfortunately it doesn't work beyond triple parity, because whatever
|
||||
* Unfortunately, it doesn't work beyond triple parity because whatever
|
||||
* value we choose to generate the power coefficients to compute other
|
||||
* parities, the resulting equations are not solvable for some
|
||||
* combinations of missing disks.
|
||||
*
|
||||
* This is expected, because the Vandermonde matrix used to compute the
|
||||
* This is expected because the Vandermonde matrix used to compute the
|
||||
* parity has no guarantee to have all submatrices not singular
|
||||
* [2, Chap 11, Problem 7] and this is a requirement to have
|
||||
* a MDS (Maximum Distance Separable) code [2, Chap 11, Theorem 8].
|
||||
* [2, Chap 11, Problem 7], and this is a requirement to have
|
||||
* an MDS (Maximum Distance Separable) code [2, Chap 11, Theorem 8].
|
||||
*
|
||||
* To overcome this limitation, we use a Cauchy matrix [3][4] to compute
|
||||
* the parity. A Cauchy matrix has the property to have all the square
|
||||
* submatrices not singular, resulting in always solvable equations,
|
||||
* the parity. A Cauchy matrix has the property of having all square
|
||||
* submatrices not singular, resulting in always solvable equations
|
||||
* for any combination of missing disks.
|
||||
*
|
||||
* The problem of this approach is that it requires the use of
|
||||
* The problem with this approach is that it requires the use of
|
||||
* generic multiplications, and not only by 2 or 2^-1, potentially
|
||||
* affecting badly the performance.
|
||||
* affecting performance negatively.
|
||||
*
|
||||
* Hopefully there is a method to implement parallel multiplications
|
||||
* using SSSE3 or AVX2 instructions [1][5]. Method competitive with the
|
||||
* Hopefully, there is a method to implement parallel multiplications
|
||||
* using SSSE3 or AVX2 instructions [1][5], a method competitive with the
|
||||
* computation of triple parity using power coefficients.
|
||||
*
|
||||
* Another important property of the Cauchy matrix is that we can setup
|
||||
* the first two rows with coefficients equal at the RAID5 and RAID6 approach
|
||||
* Another important property of the Cauchy matrix is that we can set up
|
||||
* the first two rows with coefficients equal to the RAID5 and RAID6 approach
|
||||
* described, resulting in a compatible extension, and requiring SSSE3
|
||||
* or AVX2 instructions only if triple parity or beyond is used.
|
||||
*
|
||||
@ -71,7 +71,7 @@
|
||||
* to make the first column of all 1, to optimize the computation for
|
||||
* the first disk.
|
||||
*
|
||||
* This results in the matrix A[row,col] defined as:
|
||||
* This results in the matrix A[row, col] defined as:
|
||||
*
|
||||
* 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01...
|
||||
* 01 02 04 08 10 20 40 80 1d 3a 74 e8 cd 87 13 26 4c 98 2d 5a b4 75...
|
||||
@ -80,25 +80,25 @@
|
||||
* 01 97 7f 9c 7c 18 bd a2 58 1a da 74 70 a3 e5 47 29 07 f5 80 23 e9...
|
||||
* 01 2b 3f cf 73 2c d6 ed cb 74 15 78 8a c1 17 c9 89 68 21 ab 76 3b...
|
||||
*
|
||||
* This matrix supports 6 level of parity, one for each row, for up to 251
|
||||
* This matrix supports 6 levels of parity, one for each row, for up to 251
|
||||
* data disks, one for each column, with all the 377,342,351,231 square
|
||||
* submatrices not singular, verified also with brute-force.
|
||||
* submatrices not singular, verified also with brute force.
|
||||
*
|
||||
* This matrix can be extended to support any number of parities, just
|
||||
* adding additional rows, and removing one column for each new row.
|
||||
* (see mktables.c for more details in how the matrix is generated)
|
||||
* adding additional rows and removing one column for each new row.
|
||||
* (see mktables.c for more details on how the matrix is generated)
|
||||
*
|
||||
* In details, parity is computed as:
|
||||
* In detail, parity is computed as:
|
||||
*
|
||||
* P = sum(Di)
|
||||
* Q = sum(2^i * Di)
|
||||
* R = sum(A[2,i] * Di)
|
||||
* S = sum(A[3,i] * Di)
|
||||
* T = sum(A[4,i] * Di)
|
||||
* U = sum(A[5,i] * Di) with 0<=i<N
|
||||
* U = sum(A[5,i] * Di) with 0 <= i < N
|
||||
*
|
||||
* To recover from a failure of six disks at indexes x,y,z,h,v,w,
|
||||
* with 0<=x<y<z<h<v<w<N, we compute the parity of the available N-6
|
||||
* To recover from a failure of six disks at indexes x, y, z, h, v, w,
|
||||
* with 0 <= x < y < z < h < v < w < N, we compute the parity of the available N-6
|
||||
* disks as:
|
||||
*
|
||||
* Pa = sum(Di)
|
||||
@ -106,7 +106,7 @@
|
||||
* Ra = sum(A[2,i] * Di)
|
||||
* Sa = sum(A[3,i] * Di)
|
||||
* Ta = sum(A[4,i] * Di)
|
||||
* Ua = sum(A[5,i] * Di) with 0<=i<N,i!=x,i!=y,i!=z,i!=h,i!=v,i!=w.
|
||||
* Ua = sum(A[5,i] * Di) with 0 <= i < N, i != x, i != y, i != z, i != h, i != v, i != w.
|
||||
*
|
||||
* And if we define:
|
||||
*
|
||||
@ -126,10 +126,10 @@
|
||||
* Td = A[4,x] * Dx + A[4,y] * Dy + A[4,z] * Dz + A[4,h] * Dh + A[4,v] * Dv + A[4,w] * Dw
|
||||
* Ud = A[5,x] * Dx + A[5,y] * Dy + A[5,z] * Dz + A[5,h] * Dh + A[5,v] * Dv + A[5,w] * Dw
|
||||
*
|
||||
* A linear system always solvable because the coefficients matrix is
|
||||
* always not singular due the properties of the matrix A[].
|
||||
* A linear system is always solvable because the coefficients matrix is
|
||||
* always not singular due to the properties of the matrix A[].
|
||||
*
|
||||
* Resulting speed in x64, with 8 data disks, using a stripe of 256 KiB,
|
||||
* The resulting speed in x64, with 8 data disks, using a stripe of 256 KiB,
|
||||
* for a Core i5-4670K Haswell Quad-Core 3.4GHz is:
|
||||
*
|
||||
* int8 int32 int64 sse2 ssse3 avx2
|
||||
@ -143,7 +143,7 @@
|
||||
* Values are in MiB/s of data processed by a single thread, not counting
|
||||
* generated parity.
|
||||
*
|
||||
* You can replicate these results in your machine using the
|
||||
* You can replicate these results on your machine using the
|
||||
* "raid/test/speedtest.c" program.
|
||||
*
|
||||
* For comparison, the triple parity computation using the power
|
||||
@ -154,7 +154,7 @@
|
||||
* genz 2337 2874 10920 18944
|
||||
*
|
||||
* In conclusion, the use of power coefficients, and specifically powers
|
||||
* of 1,2,2^-1, is the best option to implement triple parity in CPUs
|
||||
* of 1, 2, 2^-1, is the best option to implement triple parity in CPUs
|
||||
* without SSSE3 and AVX2.
|
||||
* But if a modern CPU with SSSE3 or AVX2 is available, the Cauchy
|
||||
* matrix is the best option because it provides a fast and general
|
||||
|
106
raid/tag.c
106
raid/tag.c
@ -14,76 +14,78 @@
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
typedef void (void_f)(void);
|
||||
|
||||
static struct raid_func {
|
||||
const char *name;
|
||||
void (*p)();
|
||||
void_f* func;
|
||||
} RAID_FUNC[] = {
|
||||
{ "int8", raid_gen3_int8 },
|
||||
{ "int8", raid_gen4_int8 },
|
||||
{ "int8", raid_gen5_int8 },
|
||||
{ "int8", raid_gen6_int8 },
|
||||
{ "int32", raid_gen1_int32 },
|
||||
{ "int64", raid_gen1_int64 },
|
||||
{ "int32", raid_gen2_int32 },
|
||||
{ "int64", raid_gen2_int64 },
|
||||
{ "int32", raid_genz_int32 },
|
||||
{ "int64", raid_genz_int64 },
|
||||
{ "int8", raid_rec1_int8 },
|
||||
{ "int8", raid_rec2_int8 },
|
||||
{ "int8", raid_recX_int8 },
|
||||
{ "int8", (void_f*)raid_gen3_int8 },
|
||||
{ "int8", (void_f*)raid_gen4_int8 },
|
||||
{ "int8", (void_f*)raid_gen5_int8 },
|
||||
{ "int8", (void_f*)raid_gen6_int8 },
|
||||
{ "int32", (void_f*)raid_gen1_int32 },
|
||||
{ "int64", (void_f*)raid_gen1_int64 },
|
||||
{ "int32", (void_f*)raid_gen2_int32 },
|
||||
{ "int64", (void_f*)raid_gen2_int64 },
|
||||
{ "int32", (void_f*)raid_genz_int32 },
|
||||
{ "int64", (void_f*)raid_genz_int64 },
|
||||
{ "int8", (void_f*)raid_rec1_int8 },
|
||||
{ "int8", (void_f*)raid_rec2_int8 },
|
||||
{ "int8", (void_f*)raid_recX_int8 },
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
#ifdef CONFIG_SSE2
|
||||
{ "sse2", raid_gen1_sse2 },
|
||||
{ "sse2", raid_gen2_sse2 },
|
||||
{ "sse2", raid_genz_sse2 },
|
||||
{ "sse2", (void_f*)raid_gen1_sse2 },
|
||||
{ "sse2", (void_f*)raid_gen2_sse2 },
|
||||
{ "sse2", (void_f*)raid_genz_sse2 },
|
||||
#endif
|
||||
#ifdef CONFIG_SSSE3
|
||||
{ "ssse3", raid_gen3_ssse3 },
|
||||
{ "ssse3", raid_gen4_ssse3 },
|
||||
{ "ssse3", raid_gen5_ssse3 },
|
||||
{ "ssse3", raid_gen6_ssse3 },
|
||||
{ "ssse3", raid_rec1_ssse3 },
|
||||
{ "ssse3", raid_rec2_ssse3 },
|
||||
{ "ssse3", raid_recX_ssse3 },
|
||||
{ "ssse3", (void_f*)raid_gen3_ssse3 },
|
||||
{ "ssse3", (void_f*)raid_gen4_ssse3 },
|
||||
{ "ssse3", (void_f*)raid_gen5_ssse3 },
|
||||
{ "ssse3", (void_f*)raid_gen6_ssse3 },
|
||||
{ "ssse3", (void_f*)raid_rec1_ssse3 },
|
||||
{ "ssse3", (void_f*)raid_rec2_ssse3 },
|
||||
{ "ssse3", (void_f*)raid_recX_ssse3 },
|
||||
#endif
|
||||
#ifdef CONFIG_AVX2
|
||||
{ "avx2", raid_gen1_avx2 },
|
||||
{ "avx2", raid_gen2_avx2 },
|
||||
{ "avx2", raid_rec1_avx2 },
|
||||
{ "avx2", raid_rec2_avx2 },
|
||||
{ "avx2", raid_recX_avx2 },
|
||||
{ "avx2", (void_f*)raid_gen1_avx2 },
|
||||
{ "avx2", (void_f*)raid_gen2_avx2 },
|
||||
{ "avx2", (void_f*)raid_rec1_avx2 },
|
||||
{ "avx2", (void_f*)raid_rec2_avx2 },
|
||||
{ "avx2", (void_f*)raid_recX_avx2 },
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
#ifdef CONFIG_SSE2
|
||||
{ "sse2e", raid_gen2_sse2ext },
|
||||
{ "sse2e", raid_genz_sse2ext },
|
||||
{ "sse2e", (void_f*)raid_gen2_sse2ext },
|
||||
{ "sse2e", (void_f*)raid_genz_sse2ext },
|
||||
#endif
|
||||
#ifdef CONFIG_SSSE3
|
||||
{ "ssse3e", raid_gen3_ssse3ext },
|
||||
{ "ssse3e", raid_gen4_ssse3ext },
|
||||
{ "ssse3e", raid_gen5_ssse3ext },
|
||||
{ "ssse3e", raid_gen6_ssse3ext },
|
||||
{ "ssse3e", (void_f*)raid_gen3_ssse3ext },
|
||||
{ "ssse3e", (void_f*)raid_gen4_ssse3ext },
|
||||
{ "ssse3e", (void_f*)raid_gen5_ssse3ext },
|
||||
{ "ssse3e", (void_f*)raid_gen6_ssse3ext },
|
||||
#endif
|
||||
#ifdef CONFIG_AVX2
|
||||
{ "avx2e", raid_gen3_avx2ext },
|
||||
{ "avx2e", raid_genz_avx2ext },
|
||||
{ "avx2e", raid_gen4_avx2ext },
|
||||
{ "avx2e", raid_gen5_avx2ext },
|
||||
{ "avx2e", raid_gen6_avx2ext },
|
||||
{ "avx2e", (void_f*)raid_gen3_avx2ext },
|
||||
{ "avx2e", (void_f*)raid_genz_avx2ext },
|
||||
{ "avx2e", (void_f*)raid_gen4_avx2ext },
|
||||
{ "avx2e", (void_f*)raid_gen5_avx2ext },
|
||||
{ "avx2e", (void_f*)raid_gen6_avx2ext },
|
||||
#endif
|
||||
#endif
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static const char *raid_tag(void (*func)())
|
||||
static const char *raid_tag(void_f* func)
|
||||
{
|
||||
struct raid_func *i = RAID_FUNC;
|
||||
|
||||
while (i->name != 0) {
|
||||
if (i->p == func)
|
||||
if (i->func == func)
|
||||
return i->name;
|
||||
++i;
|
||||
}
|
||||
@ -95,51 +97,51 @@ static const char *raid_tag(void (*func)())
|
||||
|
||||
const char *raid_gen1_tag(void)
|
||||
{
|
||||
return raid_tag(raid_gen_ptr[0]);
|
||||
return raid_tag((void_f*)raid_gen_ptr[0]);
|
||||
}
|
||||
|
||||
const char *raid_gen2_tag(void)
|
||||
{
|
||||
return raid_tag(raid_gen_ptr[1]);
|
||||
return raid_tag((void_f*)raid_gen_ptr[1]);
|
||||
}
|
||||
|
||||
const char *raid_genz_tag(void)
|
||||
{
|
||||
return raid_tag(raid_genz_ptr);
|
||||
return raid_tag((void_f*)raid_genz_ptr);
|
||||
}
|
||||
|
||||
const char *raid_gen3_tag(void)
|
||||
{
|
||||
return raid_tag(raid_gen_ptr[2]);
|
||||
return raid_tag((void_f*)raid_gen_ptr[2]);
|
||||
}
|
||||
|
||||
const char *raid_gen4_tag(void)
|
||||
{
|
||||
return raid_tag(raid_gen_ptr[3]);
|
||||
return raid_tag((void_f*)raid_gen_ptr[3]);
|
||||
}
|
||||
|
||||
const char *raid_gen5_tag(void)
|
||||
{
|
||||
return raid_tag(raid_gen_ptr[4]);
|
||||
return raid_tag((void_f*)raid_gen_ptr[4]);
|
||||
}
|
||||
|
||||
const char *raid_gen6_tag(void)
|
||||
{
|
||||
return raid_tag(raid_gen_ptr[5]);
|
||||
return raid_tag((void_f*)raid_gen_ptr[5]);
|
||||
}
|
||||
|
||||
const char *raid_rec1_tag(void)
|
||||
{
|
||||
return raid_tag(raid_rec_ptr[0]);
|
||||
return raid_tag((void_f*)raid_rec_ptr[0]);
|
||||
}
|
||||
|
||||
const char *raid_rec2_tag(void)
|
||||
{
|
||||
return raid_tag(raid_rec_ptr[1]);
|
||||
return raid_tag((void_f*)raid_rec_ptr[1]);
|
||||
}
|
||||
|
||||
const char *raid_recX_tag(void)
|
||||
{
|
||||
return raid_tag(raid_rec_ptr[2]);
|
||||
return raid_tag((void_f*)raid_rec_ptr[2]);
|
||||
}
|
||||
|
||||
|
36
snapraid-rpm.spec
Normal file
36
snapraid-rpm.spec
Normal file
@ -0,0 +1,36 @@
|
||||
Name: snapraid
|
||||
Summary: Disk array backup for many large rarely-changed files
|
||||
Version: 12.2
|
||||
Release: 3%{?dist}
|
||||
License: GPLv3+
|
||||
Group: Applications/System
|
||||
URL: http://www.snapraid.it/
|
||||
Source: https://github.com/amadvance/snapraid/releases/download/v%{version}/snapraid-%{version}.tar.gz
|
||||
BuildRequires: gcc
|
||||
|
||||
%description
|
||||
SnapRAID is a backup program for disk arrays. It stores parity
|
||||
information of your data and it's able to recover from up to six disk
|
||||
failures. SnapRAID is mainly targeted for a home media center, with a
|
||||
lot of big files that rarely change.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
make check
|
||||
|
||||
%install
|
||||
make install DESTDIR=%{buildroot}
|
||||
|
||||
%files
|
||||
%doc COPYING AUTHORS HISTORY README
|
||||
%{_bindir}/snapraid
|
||||
%{_mandir}/man1/snapraid.1*
|
||||
|
||||
%changelog
|
||||
|
67
snapraid.1
67
snapraid.1
@ -68,42 +68,39 @@ snapraid [\-V, \-\-version] [\-H, \-\-help] [\-C, \-\-gen\-conf CONTENT]
|
||||
.PP
|
||||
.PD
|
||||
.SH DESCRIPTION
|
||||
SnapRAID is a backup program for disk arrays. It stores parity
|
||||
information of your data and it recovers from up to six disk
|
||||
failures.
|
||||
SnapRAID is a backup program designed for disk arrays, storing
|
||||
parity information for data recovery in the event of up to six
|
||||
disk failures.
|
||||
.PP
|
||||
SnapRAID is mainly targeted for a home media center, with a lot of
|
||||
big files that rarely change.
|
||||
.PP
|
||||
Beside the ability to recover from disk failures, other
|
||||
features of SnapRAID are:
|
||||
Primarily intended for home media centers with large,
|
||||
infrequently changing files, SnapRAID offers several features:
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
You can use disk already filled with files, without the need to
|
||||
reformat them. You will access them like now.
|
||||
You can utilize disks already filled with files without the
|
||||
need to reformat them, accessing them as usual.
|
||||
.IP \(bu
|
||||
All your data is hashed to ensure data integrity and to avoid
|
||||
All your data is hashed to ensure data integrity and prevent
|
||||
silent corruption.
|
||||
.IP \(bu
|
||||
If the failed disks are too many to allow a recovery,
|
||||
you lose the data only on the failed disks.
|
||||
All the data in the other disks is safe.
|
||||
When the number of failed disks exceeds the parity count,
|
||||
data loss is confined to the affected disks; data on
|
||||
other disks remains accessible.
|
||||
.IP \(bu
|
||||
If you accidentally delete some files in a disk, you can
|
||||
recover them.
|
||||
If you accidentally delete files on a disk, recovery is
|
||||
possible.
|
||||
.IP \(bu
|
||||
The disks can have different sizes.
|
||||
Disks can have different sizes.
|
||||
.IP \(bu
|
||||
You can add disks at any time.
|
||||
.IP \(bu
|
||||
It doesn\'t lock\-in your data. You can stop using SnapRAID at any
|
||||
time without the need to reformat or move data.
|
||||
SnapRAID doesn\'t lock in your data; you can stop using it
|
||||
anytime without reformatting or moving data.
|
||||
.IP \(bu
|
||||
To access a file, only a single disk needs to spin, saving power and
|
||||
producing less noise.
|
||||
To access a file, only a single disk needs to spin, saving
|
||||
power and reducing noise.
|
||||
.PD
|
||||
.PP
|
||||
The official site of SnapRAID is:
|
||||
For more information, please visit the official SnapRAID site:
|
||||
.PP
|
||||
.RS 4
|
||||
http://www.snapraid.it/
|
||||
@ -118,30 +115,30 @@ consider before using it.
|
||||
.PP
|
||||
The main one is that if a disk fails, and you haven\'t recently synced,
|
||||
you may be unable to do a complete recover.
|
||||
More specifically, you may be unable to recover up to the size of the
|
||||
amount of the changed or deleted files from the last sync operation.
|
||||
More specifically, you may be unable to recover up to the size of
|
||||
the changed or deleted files from the last sync operation.
|
||||
This happens even if the files changed or deleted are not in the
|
||||
failed disk. This is the reason because SnapRAID is better suited for
|
||||
failed disk. This is why SnapRAID is better suited for
|
||||
data that rarely change.
|
||||
.PP
|
||||
Instead the new added files don\'t prevent the recovering of the already
|
||||
existing files. You may only lose the just added files, if they are on
|
||||
On the other hand, newly added files don\'t prevent recovering already
|
||||
existing files. You may only lose the recently added files, if they are on
|
||||
the failed disk.
|
||||
.PP
|
||||
Other limitations are:
|
||||
Other SnapRAID limitations are:
|
||||
.PD 0
|
||||
.IP \(bu
|
||||
You have different file\-systems for each disk.
|
||||
Using a RAID you have only a big file\-system.
|
||||
With SnapRAID, you still have separate file\-systems for each disk.
|
||||
With RAID you get a single large file\-system.
|
||||
.IP \(bu
|
||||
It doesn\'t stripe data.
|
||||
SnapRAID doesn\'t stripe data.
|
||||
With RAID you get a speed boost with striping.
|
||||
.IP \(bu
|
||||
It doesn\'t support real\-time recovery.
|
||||
SnapRAID doesn\'t support real\-time recovery.
|
||||
With RAID you do not have to stop working when a disk fails.
|
||||
.IP \(bu
|
||||
It\'s able to recover damages only from a limited number of disks.
|
||||
With a Backup you are able to recover from a complete
|
||||
SnapRAID is able to recover damages only from a limited number of disks.
|
||||
With a Backup you can recover from a complete
|
||||
failure of the whole disk array.
|
||||
.IP \(bu
|
||||
Only file, time\-stamps, symlinks and hardlinks are saved.
|
||||
@ -1363,7 +1360,7 @@ WARNING! This option is for experts only, and it\'s highly
|
||||
recommended to not change it. To change again this value in
|
||||
future you\'ll have to recreate the whole parity!
|
||||
.PP
|
||||
A reason to use a different hashsize is if you have a lot of small
|
||||
A reason to use a different blocksize is if you have a lot of small
|
||||
files. In the order of many millions.
|
||||
.PP
|
||||
For each file, even of few bytes, a whole block of parity is allocated,
|
||||
|
67
snapraid.d
67
snapraid.d
@ -21,33 +21,30 @@ Synopsis
|
||||
:snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
|
||||
|
||||
Description
|
||||
SnapRAID is a backup program for disk arrays. It stores parity
|
||||
information of your data and it recovers from up to six disk
|
||||
failures.
|
||||
SnapRAID is a backup program designed for disk arrays, storing
|
||||
parity information for data recovery in the event of up to six
|
||||
disk failures.
|
||||
|
||||
SnapRAID is mainly targeted for a home media center, with a lot of
|
||||
big files that rarely change.
|
||||
Primarily intended for home media centers with large,
|
||||
infrequently changing files, SnapRAID offers several features:
|
||||
|
||||
Beside the ability to recover from disk failures, other
|
||||
features of SnapRAID are:
|
||||
|
||||
* You can use disk already filled with files, without the need to
|
||||
reformat them. You will access them like now.
|
||||
* All your data is hashed to ensure data integrity and to avoid
|
||||
* You can utilize disks already filled with files without the
|
||||
need to reformat them, accessing them as usual.
|
||||
* All your data is hashed to ensure data integrity and prevent
|
||||
silent corruption.
|
||||
* If the failed disks are too many to allow a recovery,
|
||||
you lose the data only on the failed disks.
|
||||
All the data in the other disks is safe.
|
||||
* If you accidentally delete some files in a disk, you can
|
||||
recover them.
|
||||
* The disks can have different sizes.
|
||||
* When the number of failed disks exceeds the parity count,
|
||||
data loss is confined to the affected disks; data on
|
||||
other disks remains accessible.
|
||||
* If you accidentally delete files on a disk, recovery is
|
||||
possible.
|
||||
* Disks can have different sizes.
|
||||
* You can add disks at any time.
|
||||
* It doesn't lock-in your data. You can stop using SnapRAID at any
|
||||
time without the need to reformat or move data.
|
||||
* To access a file, only a single disk needs to spin, saving power and
|
||||
producing less noise.
|
||||
* SnapRAID doesn't lock in your data; you can stop using it
|
||||
anytime without reformatting or moving data.
|
||||
* To access a file, only a single disk needs to spin, saving
|
||||
power and reducing noise.
|
||||
|
||||
The official site of SnapRAID is:
|
||||
For more information, please visit the official SnapRAID site:
|
||||
|
||||
:http://www.snapraid.it/
|
||||
|
||||
@ -58,26 +55,26 @@ Limitations
|
||||
|
||||
The main one is that if a disk fails, and you haven't recently synced,
|
||||
you may be unable to do a complete recover.
|
||||
More specifically, you may be unable to recover up to the size of the
|
||||
amount of the changed or deleted files from the last sync operation.
|
||||
More specifically, you may be unable to recover up to the size of
|
||||
the changed or deleted files from the last sync operation.
|
||||
This happens even if the files changed or deleted are not in the
|
||||
failed disk. This is the reason because SnapRAID is better suited for
|
||||
failed disk. This is why SnapRAID is better suited for
|
||||
data that rarely change.
|
||||
|
||||
Instead the new added files don't prevent the recovering of the already
|
||||
existing files. You may only lose the just added files, if they are on
|
||||
On the other hand, newly added files don't prevent recovering already
|
||||
existing files. You may only lose the recently added files, if they are on
|
||||
the failed disk.
|
||||
|
||||
Other limitations are:
|
||||
Other SnapRAID limitations are:
|
||||
|
||||
* You have different file-systems for each disk.
|
||||
Using a RAID you have only a big file-system.
|
||||
* It doesn't stripe data.
|
||||
* With SnapRAID, you still have separate file-systems for each disk.
|
||||
With RAID you get a single large file-system.
|
||||
* SnapRAID doesn't stripe data.
|
||||
With RAID you get a speed boost with striping.
|
||||
* It doesn't support real-time recovery.
|
||||
* SnapRAID doesn't support real-time recovery.
|
||||
With RAID you do not have to stop working when a disk fails.
|
||||
* It's able to recover damages only from a limited number of disks.
|
||||
With a Backup you are able to recover from a complete
|
||||
* SnapRAID is able to recover damages only from a limited number of disks.
|
||||
With a Backup you can recover from a complete
|
||||
failure of the whole disk array.
|
||||
* Only file, time-stamps, symlinks and hardlinks are saved.
|
||||
Permissions, ownership and extended attributes are not saved.
|
||||
@ -1062,7 +1059,7 @@ Configuration
|
||||
recommended to not change it. To change again this value in
|
||||
future you'll have to recreate the whole parity!
|
||||
|
||||
A reason to use a different hashsize is if you have a lot of small
|
||||
A reason to use a different blocksize is if you have a lot of small
|
||||
files. In the order of many millions.
|
||||
|
||||
For each file, even of few bytes, a whole block of parity is allocated,
|
||||
|
67
snapraid.txt
67
snapraid.txt
@ -28,33 +28,30 @@ snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
|
||||
2 DESCRIPTION
|
||||
=============
|
||||
|
||||
SnapRAID is a backup program for disk arrays. It stores parity
|
||||
information of your data and it recovers from up to six disk
|
||||
failures.
|
||||
SnapRAID is a backup program designed for disk arrays, storing
|
||||
parity information for data recovery in the event of up to six
|
||||
disk failures.
|
||||
|
||||
SnapRAID is mainly targeted for a home media center, with a lot of
|
||||
big files that rarely change.
|
||||
Primarily intended for home media centers with large,
|
||||
infrequently changing files, SnapRAID offers several features:
|
||||
|
||||
Beside the ability to recover from disk failures, other
|
||||
features of SnapRAID are:
|
||||
|
||||
* You can use disk already filled with files, without the need to
|
||||
reformat them. You will access them like now.
|
||||
* All your data is hashed to ensure data integrity and to avoid
|
||||
* You can utilize disks already filled with files without the
|
||||
need to reformat them, accessing them as usual.
|
||||
* All your data is hashed to ensure data integrity and prevent
|
||||
silent corruption.
|
||||
* If the failed disks are too many to allow a recovery,
|
||||
you lose the data only on the failed disks.
|
||||
All the data in the other disks is safe.
|
||||
* If you accidentally delete some files in a disk, you can
|
||||
recover them.
|
||||
* The disks can have different sizes.
|
||||
* When the number of failed disks exceeds the parity count,
|
||||
data loss is confined to the affected disks; data on
|
||||
other disks remains accessible.
|
||||
* If you accidentally delete files on a disk, recovery is
|
||||
possible.
|
||||
* Disks can have different sizes.
|
||||
* You can add disks at any time.
|
||||
* It doesn't lock-in your data. You can stop using SnapRAID at any
|
||||
time without the need to reformat or move data.
|
||||
* To access a file, only a single disk needs to spin, saving power and
|
||||
producing less noise.
|
||||
* SnapRAID doesn't lock in your data; you can stop using it
|
||||
anytime without reformatting or moving data.
|
||||
* To access a file, only a single disk needs to spin, saving
|
||||
power and reducing noise.
|
||||
|
||||
The official site of SnapRAID is:
|
||||
For more information, please visit the official SnapRAID site:
|
||||
|
||||
http://www.snapraid.it/
|
||||
|
||||
@ -68,26 +65,26 @@ consider before using it.
|
||||
|
||||
The main one is that if a disk fails, and you haven't recently synced,
|
||||
you may be unable to do a complete recover.
|
||||
More specifically, you may be unable to recover up to the size of the
|
||||
amount of the changed or deleted files from the last sync operation.
|
||||
More specifically, you may be unable to recover up to the size of
|
||||
the changed or deleted files from the last sync operation.
|
||||
This happens even if the files changed or deleted are not in the
|
||||
failed disk. This is the reason because SnapRAID is better suited for
|
||||
failed disk. This is why SnapRAID is better suited for
|
||||
data that rarely change.
|
||||
|
||||
Instead the new added files don't prevent the recovering of the already
|
||||
existing files. You may only lose the just added files, if they are on
|
||||
On the other hand, newly added files don't prevent recovering already
|
||||
existing files. You may only lose the recently added files, if they are on
|
||||
the failed disk.
|
||||
|
||||
Other limitations are:
|
||||
Other SnapRAID limitations are:
|
||||
|
||||
* You have different file-systems for each disk.
|
||||
Using a RAID you have only a big file-system.
|
||||
* It doesn't stripe data.
|
||||
* With SnapRAID, you still have separate file-systems for each disk.
|
||||
With RAID you get a single large file-system.
|
||||
* SnapRAID doesn't stripe data.
|
||||
With RAID you get a speed boost with striping.
|
||||
* It doesn't support real-time recovery.
|
||||
* SnapRAID doesn't support real-time recovery.
|
||||
With RAID you do not have to stop working when a disk fails.
|
||||
* It's able to recover damages only from a limited number of disks.
|
||||
With a Backup you are able to recover from a complete
|
||||
* SnapRAID is able to recover damages only from a limited number of disks.
|
||||
With a Backup you can recover from a complete
|
||||
failure of the whole disk array.
|
||||
* Only file, time-stamps, symlinks and hardlinks are saved.
|
||||
Permissions, ownership and extended attributes are not saved.
|
||||
@ -1138,7 +1135,7 @@ WARNING! This option is for experts only, and it's highly
|
||||
recommended to not change it. To change again this value in
|
||||
future you'll have to recreate the whole parity!
|
||||
|
||||
A reason to use a different hashsize is if you have a lot of small
|
||||
A reason to use a different blocksize is if you have a lot of small
|
||||
files. In the order of many millions.
|
||||
|
||||
For each file, even of few bytes, a whole block of parity is allocated,
|
||||
|
7
valgrind.supp
Normal file
7
valgrind.supp
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
printf reports false positives when printing more than one variables at time
|
||||
exp-sgcheck:SorG
|
||||
...
|
||||
fun:printf
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user