Fix 0000437: when storing on multiple volumes via File backend, a data
block of 64k gets lost
This commit is contained in:
parent
10e247c316
commit
a36e8e37b9
|
@ -1,6 +1,7 @@
|
|||
AUX bareos-12.4.5-Makefile.patch 924 SHA256 0b2428d3ee7ea5ceae4e02d3c315cc6f6b59d21d44749967dd121e29c060942d SHA512 f1b5da39d01f6b00851810c6a0cbcda9ac0561fb165054f6f2c4540943b41af9d524a6a8aca1ae87d55fa8624aecf44c3c0db03c2d7c22690a84c16994289eed WHIRLPOOL 0aeddbe01415260fce862dfa0b387bb5a443b29ed1367ea0fb0c2350c2af24f4f1934497d1590612fa3a3e62e929e5811caa9591e99e5a76fcfc6d73769baa1a
|
||||
AUX bareos-12.4.5-bat-ldflags.patch 389 SHA256 b4b569fecdecbef0b5e0c1bcafddd61a48893ee1e33b52289a455a4773adc9ca SHA512 811fd6ffc2a1c4aeef3afd9001fd2bf01c70ef3f75ed6949ec6b064a9e6ce7a4893ffe464e5c9c67e33fdf92e00b0601500930165891b70d403d31a2ee347434 WHIRLPOOL 488a764b303c3ed077d55bf04ae91e33d24c69c71476d8ad3416608f60a8071471a96f2a539266509b20133d5cf0e0f66ac284aee99f5378030b7a6c394a1987
|
||||
AUX bareos-14.2.2-bpipe.patch 1232 SHA256 bcd4e76545e1306e9bde756f7752266046fde57bd9e553ade60595fb88f96e3a SHA512 3ca51f4c69b0f8d4520b1d0503f09b4f82933e344cdd7fca6f51587bf61502d9320aa0c34b56a1a9dc351348f2e281cb91334a3c31a5207bbdd0fb0d49cef260 WHIRLPOOL 4e22f318639c92d0f504eb48b603f9e777b69e964f133079e69ac903a4b8f233ef84e9658cdbf5d20c4ed9c8f9ea74b5e62708617f2dc80b8b91275a07204b48
|
||||
AUX bareos-14.2.2-dataloss.patch 1743 SHA256 bbb178d111177cb35e7cfcaaccd33e58a29d4fd0ba890ade110483f03fd3b4b8 SHA512 a45f0c25df8049009efd0e9ccf54acd3f5c2ebee72b7413948b60798496508ef29ccb5638a95078794cb7d25bde2710a08f2dee2be3a39ca4e6d5118e1087151 WHIRLPOOL 2886dc578b5ddd4b1d5cdc15741cfc785c8af5f17c830a367a6c8a6aefc52d986407097a0ec52fdfb03cfb1d0fd0add079ca768b523e33082d9c3f7d099c69a3
|
||||
AUX bareos-dir.confd 788 SHA256 9cd4ac430bfc29e9b6c71c24b94fc4d4baa6febaec062b3fc90eb3db86ff8a83 SHA512 85307268abd1bc15e7e1b7ab4d519aa579349f7c61e242aba6cf9d7613a25ad67034b7e8cc12be20d7b0b4ec73100fc859847fe676641f7d36e7b61a6988a7d0 WHIRLPOOL 18d0b42a01c77493d5867a5a17fd7cd5081937da22e0ff027814176398a2bbb5a246a81cfc3a9db3ea405a846e619d36f88063ed8b5b4e7822d71102200e4a21
|
||||
AUX bareos-dir.initd 606 SHA256 c8486c7b97ab77a3bbb857ab6a6183f4cc1877198224115aa824fd65af903f59 SHA512 9393044770b69018702e512a282152aded93f4ade9dc3de73590d69102b81f131f49c12d6d309609758ec6e29276ea7bf730cef86cc30f6f7b3de12405459d92 WHIRLPOOL bca82ad24f660683e75324f3a36be87917faf26369039a644c316b57e2e584c585decd5dfa73f8b981397d73b6d4dc7a52b360254c34c17964eeb494ab3754dd
|
||||
AUX bareos-fd.confd 357 SHA256 f1ecfc6945d1563aec0330943f7e887c99066de3350d84f994f4f5f42fa2e0f4 SHA512 59c4e304f4934c08dc99cbe43f8d989a7bf66d5c8177ce958bd76e4a5b6ef697db21bb79c3c586a1af18f2f3f1e1f350ea2afb7237f7ce86914b20169b7f5612 WHIRLPOOL 41708ac2ee0f90b82ddfbb74cfd41c0c7801fd096caeac32a312b80e6bd48744e23e422a04c3704f40ea717f9e9f70c98dc9885d266f19bb5e470a509236125b
|
||||
|
@ -8,4 +9,4 @@ AUX bareos-fd.initd 571 SHA256 7ea2ffc24dcb5e6187c65690de3299a0692ec21510ede4d15
|
|||
AUX bareos-sd.confd 506 SHA256 9842116be1e53c0a592db79cb01d67c36482171bfffba6459c5bfa93a58564b1 SHA512 33e26f6582b08d56936bd75994444fb79a7ee1940ef6e6a1e0ff2194a10e42611404b175330ff77f81ca52215ec8f0a97e05b39e27667560a861cf6b30055f18 WHIRLPOOL bb254d806e40d6e29c5ae284cadcbc7e5cbce0818035ba7c7fb9918970f0d90d85d5bba108d986569e62e7600281faf018253285012b8ee8f5ed0e682f9aff7a
|
||||
AUX bareos-sd.initd 595 SHA256 60317066caec54c6e4b30255affaec7f741e8a88e4fb5fc8346fb018d5dc82ad SHA512 576a1af894bb28ab49eac580dbfb610372da162d69fb091f30b903735c3274c3420604c2628fd121b642385bcc144c3bac1555de9fab34c709fc30b49c8a8e69 WHIRLPOOL 34098ad67131caf4fdd3bea371869bb093cb9765dd5a1a53d1d746aacad57f2c88b523abd5bb8ba391bf07c422a87de7f9320d11dc65981348620e136cb09ccc
|
||||
DIST bareos-14.2.2.tar.gz 3811787 SHA256 8792fe79689f7a1053ecb493ba52258acb29d0998b71d65178a311d46b7cf2bf SHA512 be490ab2f8085975f164ac554cac7d6bbef1af01c8350b5816b2033a37827de4a81bead6ce1e699fe5cc44085dce2b6a0330b91239fb87907e22f9c8dc710156 WHIRLPOOL 384415d553d61e7aa1eaa22611cc9d9eacf8338df82d911409e52a774e756b0539810c60be3dade91eadcc679794ad7c3bb5a155d7d699171f6a4fdead5a5470
|
||||
EBUILD bareos-14.2.2.ebuild 11685 SHA256 48bb70d2d76acbfda9523e18fe0da9e6076805951c152a3c70a574c50470a8ed SHA512 2d2b104ce4e90c85506442d716db99474cb580266134da531f5be354eec56e1f75154fb181cdcd56687f7f0dc6e62eae9cfbffd2905bccf5e0704ab7a874253d WHIRLPOOL 3d0b159a2798e7733c9a358cc30d103f638eee845b42ce8f299655e02a32826d40dda9a29aeddcb3342384c3652ff4701e7fc2c73ee32656d91250ec9bf25467
|
||||
EBUILD bareos-14.2.2.ebuild 11791 SHA256 c8d6b3b245ad679eed766cd3451a59743fc7c4c96048d87b663bdc4b36e652d6 SHA512 d846349e41d7285270c058f6fc68790e3c90818c3845c99c73bcf779c142cceec506d4ad1c9084fb38c444cedee37353db3b6b9323abe63b750014073830a1ee WHIRLPOOL 3bc44e24208d2661247f4cce4f63f608641c908bfe37975b5e338ea2907275cd6f07e1d913e0ec1695023ac21ff7fa3993c1e7353e8a320aad872bfb9353a655
|
||||
|
|
|
@ -134,6 +134,9 @@ src_prepare() {
|
|||
|
||||
# bug 0000422 https://bugs.bareos.org/view.php?id=422
|
||||
epatch "${FILESDIR}/${PN}-14.2.2-bpipe.patch"
|
||||
|
||||
# bug 0000437 https://bugs.bareos.org/view.php?id=437
|
||||
epatch "${FILESDIR}/${PN}-14.2.2-dataloss.patch"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
From 263240eaa911563a8468ecdaf7d4957201b41426 Mon Sep 17 00:00:00 2001
|
||||
From: Marco van Wieringen <marco.van.wieringen@bareos.com>
|
||||
Date: Fri, 13 Mar 2015 18:32:58 +0100
|
||||
Subject: [PATCH] Don't trash dcr->rec while doing autolabeling.
|
||||
|
||||
Fixes #437: When storing on multiple volumes via File backend, a data
|
||||
block of 64k gets lost
|
||||
---
|
||||
src/stored/label.c | 14 +++++++++-----
|
||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/stored/label.c b/src/stored/label.c
|
||||
index deeb169..4cbfb64 100644
|
||||
--- a/src/stored/label.c
|
||||
+++ b/src/stored/label.c
|
||||
@@ -341,6 +341,7 @@ static bool write_volume_label_to_block(DCR *dcr)
|
||||
bool write_new_volume_label_to_dev(DCR *dcr, const char *VolName,
|
||||
const char *PoolName, bool relabel)
|
||||
{
|
||||
+ DEV_RECORD *rec;
|
||||
JCR *jcr = dcr->jcr;
|
||||
DEVICE *dev = dcr->dev;
|
||||
DEV_BLOCK *block = dcr->block;
|
||||
@@ -418,15 +419,18 @@ bool write_new_volume_label_to_dev(DCR *dcr, const char *VolName,
|
||||
goto bail_out;
|
||||
}
|
||||
|
||||
- create_volume_label_record(dcr, dev, dcr->rec);
|
||||
- dcr->rec->Stream = 0;
|
||||
- dcr->rec->maskedStream = 0;
|
||||
+ rec = new_record();
|
||||
+ create_volume_label_record(dcr, dev, rec);
|
||||
+ rec->Stream = 0;
|
||||
+ rec->maskedStream = 0;
|
||||
|
||||
- if (!write_record_to_block(dcr, dcr->rec)) {
|
||||
+ if (!write_record_to_block(dcr, rec)) {
|
||||
Dmsg2(130, "Bad Label write on %s: ERR=%s\n", dev->print_name(), dev->print_errmsg());
|
||||
+ free_record(rec);
|
||||
goto bail_out;
|
||||
} else {
|
||||
- Dmsg2(130, "Wrote label of %d bytes to %s\n", dcr->rec->data_len, dev->print_name());
|
||||
+ Dmsg2(130, "Wrote label of %d bytes to %s\n", rec->data_len, dev->print_name());
|
||||
+ free_record(rec);
|
||||
}
|
||||
|
||||
Dmsg0(130, "Call write_block_to_dev()\n");
|
Loading…
Reference in New Issue