mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 08:20:16 +00:00
ubik-dont-serve-data-while-syncing-20030927
while we're syncing a new database over, and if the sync fails, don't keep serving out of the truncated and/or trashed database. set the db version to 0 before starting the sync.
This commit is contained in:
parent
d4d4680f40
commit
161a1f6509
@ -538,6 +538,7 @@ SDISK_SendFile(rxcall, file, length, avers)
|
|||||||
tversion.epoch = 0; /* start off by labelling in-transit db as invalid */
|
tversion.epoch = 0; /* start off by labelling in-transit db as invalid */
|
||||||
tversion.counter = 0;
|
tversion.counter = 0;
|
||||||
(*dbase->setlabel) (dbase, file, &tversion);/* setlabel does sync */
|
(*dbase->setlabel) (dbase, file, &tversion);/* setlabel does sync */
|
||||||
|
memcpy(&ubik_dbase->version, &tversion, sizeof(struct ubik_version));
|
||||||
while (length > 0) {
|
while (length > 0) {
|
||||||
tlen = (length > sizeof(tbuffer) ? sizeof(tbuffer) : length);
|
tlen = (length > sizeof(tbuffer) ? sizeof(tbuffer) : length);
|
||||||
code = rx_Read(rxcall, tbuffer, tlen);
|
code = rx_Read(rxcall, tbuffer, tlen);
|
||||||
|
Loading…
Reference in New Issue
Block a user