From: Andrew Deason Date: Thu, 31 Jan 2019 21:44:38 +0000 (-0600) Subject: volser: Remove unused VolRestore flags args X-Git-Tag: openafs-devel-1_9_0~370 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=1a0e5e867107b3f849c17f30976831b5bf5a0e94 volser: Remove unused VolRestore flags args SAFSVolRestore has a 'flags' argument, which the volserver passes on to various internal functions, but the value of the flags never actually changes any behavior. Remove the 'aflags' argument (and the derived 'incremental' arg) from a few of our internal functions. The relevant arguments have been unused since OpenAFS 1.0. Change-Id: Ib6ba3d5d9aa3e29d720921cb32fe45c871cd803e Reviewed-on: https://gerrit.openafs.org/13458 Tested-by: Andrew Deason Reviewed-by: Benjamin Kaduk --- diff --git a/src/volser/dumpstuff.c b/src/volser/dumpstuff.c index 546b4f6..90fadab 100644 --- a/src/volser/dumpstuff.c +++ b/src/volser/dumpstuff.c @@ -64,9 +64,9 @@ static int DumpVnodeIndex(struct iod *iodp, Volume * vp, static int DumpVnode(struct iod *iodp, struct VnodeDiskObject *v, VolumeId volid, int vnodeNumber, int dumpEverything); static int ReadDumpHeader(struct iod *iodp, struct DumpHeader *hp); -static int ReadVnodes(struct iod *iodp, Volume * vp, int incremental, - afs_foff_t * Lbuf, afs_int32 s1, afs_foff_t * Sbuf, - afs_int32 s2, afs_int32 delo); +static int ReadVnodes(struct iod *iodp, Volume * vp, afs_foff_t * Lbuf, + afs_int32 s1, afs_foff_t * Sbuf, afs_int32 s2, + afs_int32 delo); static afs_fsize_t volser_WriteFile(int vn, struct iod *iodp, FdHandle_t * handleP, int tag, Error * status); @@ -1233,8 +1233,7 @@ ProcessIndex(Volume * vp, VnodeClass class, afs_foff_t ** Bufp, int *sizep, int -RestoreVolume(struct rx_call *call, Volume * avp, int incremental, - struct restoreCookie *cookie) +RestoreVolume(struct rx_call *call, Volume * avp, struct restoreCookie *cookie) { VolumeDiskData vol; struct DumpHeader header; @@ -1290,7 +1289,7 @@ RestoreVolume(struct rx_call *call, Volume * avp, int incremental, tdelo = delo; while (1) { - if (ReadVnodes(iodp, vp, 0, b1, s1, b2, s2, tdelo)) { + if (ReadVnodes(iodp, vp, b1, s1, b2, s2, tdelo)) { Log("1 Volser: RestoreVolume: Error reading vnodes (id: %u); aborted\n", V_id(vp)); error = VOLSERREAD_DUMPERROR; @@ -1376,9 +1375,8 @@ RestoreVolume(struct rx_call *call, Volume * avp, int incremental, } static int -ReadVnodes(struct iod *iodp, Volume * vp, int incremental, - afs_foff_t * Lbuf, afs_int32 s1, afs_foff_t * Sbuf, afs_int32 s2, - afs_int32 delo) +ReadVnodes(struct iod *iodp, Volume * vp, afs_foff_t * Lbuf, afs_int32 s1, + afs_foff_t * Sbuf, afs_int32 s2, afs_int32 delo) { afs_int32 vnodeNumber; char buf[SIZEOF_LARGEDISKVNODE]; diff --git a/src/volser/dumpstuff.h b/src/volser/dumpstuff.h index e949f3c..b456f88 100644 --- a/src/volser/dumpstuff.h +++ b/src/volser/dumpstuff.h @@ -34,8 +34,7 @@ struct iod { extern int DumpVolume(struct rx_call *call, Volume *vp, afs_int32, int); extern int DumpVolMulti(struct rx_call **, int, Volume *, afs_int32, int, int *); -extern int RestoreVolume(struct rx_call *, Volume *, int, - struct restoreCookie *); +extern int RestoreVolume(struct rx_call *, Volume *, struct restoreCookie *); extern int SizeDumpVolume(struct rx_call *, Volume *, afs_int32, int, struct volintSize *); diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c index ddd06e5..6a6e72c 100644 --- a/src/volser/volprocs.c +++ b/src/volser/volprocs.c @@ -96,8 +96,7 @@ static afs_int32 VolForward(struct rx_call *, afs_int32, afs_int32, struct destServer *destination, afs_int32, struct restoreCookie *cookie); static afs_int32 VolDump(struct rx_call *, afs_int32, afs_int32, afs_int32); -static afs_int32 VolRestore(struct rx_call *, afs_int32, afs_int32, - struct restoreCookie *); +static afs_int32 VolRestore(struct rx_call *, afs_int32, struct restoreCookie *); static afs_int32 VolEndTrans(struct rx_call *, afs_int32, afs_int32 *); static afs_int32 VolSetForwarding(struct rx_call *, afs_int32, afs_int32); static afs_int32 VolGetStatus(struct rx_call *, afs_int32, @@ -1534,14 +1533,13 @@ SAFSVolRestore(struct rx_call *acid, afs_int32 atrans, afs_int32 aflags, { afs_int32 code; - code = VolRestore(acid, atrans, aflags, cookie); + code = VolRestore(acid, atrans, cookie); osi_auditU(acid, VS_RestoreEvent, code, AUD_LONG, atrans, AUD_END); return code; } static afs_int32 -VolRestore(struct rx_call *acid, afs_int32 atrans, afs_int32 aflags, - struct restoreCookie *cookie) +VolRestore(struct rx_call *acid, afs_int32 atrans, struct restoreCookie *cookie) { struct volser_trans *tt; afs_int32 code, tcode; @@ -1566,7 +1564,7 @@ VolRestore(struct rx_call *acid, afs_int32 atrans, afs_int32 aflags, DFlushVolume(V_parentId(tt->volume)); /* Ensure dir buffers get dropped */ - code = RestoreVolume(acid, tt->volume, (aflags & 1), cookie); /* last is incrementalp */ + code = RestoreVolume(acid, tt->volume, cookie); FSYNC_VolOp(tt->volid, NULL, FSYNC_VOL_BREAKCBKS, 0l, NULL); TClearRxCall(tt); tcode = TRELE(tt);