From: Chaskiel M Grundman Date: Fri, 15 Nov 2002 13:17:21 +0000 (+0000) Subject: STABLE12-REVERT-volserver-dont-deal-poorly-with-fssync-blockage-20021016 X-Git-Tag: openafs-stable-1_2_8~27 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=0b5929986420923fd604cfeb452b86d14acfbb2d;p=packages%2Fo%2Fopenafs.git STABLE12-REVERT-volserver-dont-deal-poorly-with-fssync-blockage-20021016 not ready yet, needs work (cherry picked from commit fb3ca247296a14eb6ae0497f7ac4efe5e26d204b) --- diff --git a/src/vol/fssync.c b/src/vol/fssync.c index b25e3a5be..0a2fb389a 100644 --- a/src/vol/fssync.c +++ b/src/vol/fssync.c @@ -129,10 +129,6 @@ static void GetHandler(fd_set *fdsetp, int *maxfdp); */ struct Lock FSYNC_handler_lock; -/* this lock prevents a volume utility or volserver from having multiple FSYNC - requests active simultaneously */ -struct Lock FSYNC_client_lock; - int FSYNC_clientInit(void) { struct sockaddr_in addr; @@ -140,7 +136,6 @@ int FSYNC_clientInit(void) static backoff[] = {3,3,3,5,5,5,7,15,16,24,32,40,48,0}; int *timeout = &backoff[0]; - Lock_Init(&FSYNC_client_lock); for (;;) { FS_sd = getport(&addr); if (connect(FS_sd, (struct sockaddr *) &addr, sizeof(addr)) >= 0) @@ -172,7 +167,6 @@ void FSYNC_clientFinis(void) close(FS_sd); #endif FS_sd = -1; - Lock_Destroy(&FSYNC_client_lock); Lock_Destroy(&FSYNC_handler_lock); } @@ -181,12 +175,6 @@ int FSYNC_askfs(VolumeId volume, char *partName, int com, int reason) byte response; struct command command; int n; -#ifndef AFS_NT40_ENV -#ifndef AFS_PTHREAD_ENV - fd_set *fds; -#endif - ObtainWriteLock(&FSYNC_client_lock); -#endif command.volume = volume; command.command = com; command.reason = reason; @@ -209,28 +197,14 @@ int FSYNC_askfs(VolumeId volume, char *partName, int com, int reason) #else if (write(FS_sd, &command, sizeof(command)) != sizeof(command)) { printf("FSYNC_askfs: write to file server failed\n"); - ReleaseWriteLock(&FSYNC_client_lock); return FSYNC_DENIED; } -#ifndef AFS_PTHREAD_ENV - fds=IOMGR_AllocFDSet(); - if (fds) { - FD_SET(FS_sd, fds); - IOMGR_Select(FS_sd+1, fds, 0,0,0); - IOMGR_FreeFDSet(fds); - fds=0; - } -#endif while ((n = read(FS_sd, &response, 1)) != 1) { if (n == 0 || errno != EINTR) { printf("FSYNC_askfs: No response from file server\n"); - ReleaseWriteLock(&FSYNC_client_lock); return FSYNC_DENIED; } } -#endif -#ifndef AFS_NT40_ENV - ReleaseWriteLock(&FSYNC_client_lock); #endif if (response == 0) { printf("FSYNC_askfs: negative response from file server; volume %u, command %d\n", command.volume, command.command);