Author: jra Date: 2007-01-16 17:39:13 +0000 (Tue, 16 Jan 2007) New Revision: 20835
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20835 Log: Janitor for Volker. Trying to keep the fileserver code as much in sync as possible. Jeremy. Modified: branches/SAMBA_3_0_24/source/smbd/oplock_irix.c Changeset: Modified: branches/SAMBA_3_0_24/source/smbd/oplock_irix.c =================================================================== --- branches/SAMBA_3_0_24/source/smbd/oplock_irix.c 2007-01-16 15:51:37 UTC (rev 20834) +++ branches/SAMBA_3_0_24/source/smbd/oplock_irix.c 2007-01-16 17:39:13 UTC (rev 20835) @@ -38,16 +38,19 @@ set_effective_capability(KERNEL_OPLOCK_CAPABILITY); - slprintf(tmpname,sizeof(tmpname)-1, "%s/koplock.%d", lp_lockdir(), (int)sys_getpid()); + slprintf(tmpname,sizeof(tmpname)-1, "%s/koplock.%d", lp_lockdir(), + (int)sys_getpid()); if(pipe(pfd) != 0) { - DEBUG(0,("check_kernel_oplocks: Unable to create pipe. Error was %s\n", + DEBUG(0,("check_kernel_oplocks: Unable to create pipe. Error " + "was %s\n", strerror(errno) )); return False; } if((fd = sys_open(tmpname, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0600)) < 0) { - DEBUG(0,("check_kernel_oplocks: Unable to open temp test file %s. Error was %s\n", + DEBUG(0,("check_kernel_oplocks: Unable to open temp test file " + "%s. Error was %s\n", tmpname, strerror(errno) )); unlink( tmpname ); close(pfd[0]); @@ -58,8 +61,9 @@ unlink(tmpname); if(sys_fcntl_long(fd, F_OPLKREG, pfd[1]) == -1) { - DEBUG(0,("check_kernel_oplocks: Kernel oplocks are not available on this machine. \ -Disabling kernel oplock support.\n" )); + DEBUG(0,("check_kernel_oplocks: Kernel oplocks are not " + "available on this machine. Disabling kernel oplock " + "support.\n" )); close(pfd[0]); close(pfd[1]); close(fd); @@ -67,8 +71,9 @@ } if(sys_fcntl_long(fd, F_OPLKACK, OP_REVOKE) < 0 ) { - DEBUG(0,("check_kernel_oplocks: Error when removing kernel oplock. Error was %s. \ -Disabling kernel oplock support.\n", strerror(errno) )); + DEBUG(0,("check_kernel_oplocks: Error when removing kernel " + "oplock. Error was %s. Disabling kernel oplock " + "support.\n", strerror(errno) )); close(pfd[0]); close(pfd[1]); close(fd); @@ -145,7 +150,8 @@ DEBUG(5,("irix_oplock_receive_message: kernel oplock break request " "received for dev = %x, inode = %.0f\n, file_id = %ul", - (unsigned int)fsp->dev, (double)fsp->inode, fsp->fh->file_id )); + (unsigned int)fsp->dev, (double)fsp->inode, + fsp->fh->file_id )); return fsp; } @@ -158,20 +164,28 @@ { if (sys_fcntl_long(fsp->fh->fd, F_OPLKREG, oplock_pipe_write) == -1) { if(errno != EAGAIN) { - DEBUG(0,("irix_set_kernel_oplock: Unable to get kernel oplock on file %s, dev = %x, \ -inode = %.0f, file_id = %ul. Error was %s\n", - fsp->fsp_name, (unsigned int)fsp->dev, (double)fsp->inode, fsp->fh->file_id, + DEBUG(0,("irix_set_kernel_oplock: Unable to get " + "kernel oplock on file %s, dev = %x, inode " + "= %.0f, file_id = %ul. Error was %s\n", + fsp->fsp_name, (unsigned int)fsp->dev, + (double)fsp->inode, fsp->fh->file_id, strerror(errno) )); } else { - DEBUG(5,("irix_set_kernel_oplock: Refused oplock on file %s, fd = %d, dev = %x, \ -inode = %.0f, file_id = %ul. Another process had the file open.\n", - fsp->fsp_name, fsp->fh->fd, (unsigned int)fsp->dev, (double)fsp->inode, fsp->fh->file_id )); + DEBUG(5,("irix_set_kernel_oplock: Refused oplock on " + "file %s, fd = %d, dev = %x, inode = %.0f, " + "file_id = %ul. Another process had the file " + "open.\n", + fsp->fsp_name, fsp->fh->fd, + (unsigned int)fsp->dev, (double)fsp->inode, + fsp->fh->file_id )); } return False; } - DEBUG(10,("irix_set_kernel_oplock: got kernel oplock on file %s, dev = %x, inode = %.0f, file_id = %ul\n", - fsp->fsp_name, (unsigned int)fsp->dev, (double)fsp->inode, fsp->fh->file_id)); + DEBUG(10,("irix_set_kernel_oplock: got kernel oplock on file %s, dev " + "= %x, inode = %.0f, file_id = %ul\n", + fsp->fsp_name, (unsigned int)fsp->dev, (double)fsp->inode, + fsp->fh->file_id)); return True; } @@ -188,8 +202,9 @@ * oplock state of this file. */ int state = sys_fcntl_long(fsp->fh->fd, F_OPLKACK, -1); - dbgtext("irix_release_kernel_oplock: file %s, dev = %x, inode = %.0f file_id = %ul, has kernel \ -oplock state of %x.\n", fsp->fsp_name, (unsigned int)fsp->dev, + dbgtext("irix_release_kernel_oplock: file %s, dev = %x, " + "inode = %.0f file_id = %ul, has kernel oplock state " + "of %x.\n", fsp->fsp_name, (unsigned int)fsp->dev, (double)fsp->inode, fsp->fh->file_id, state ); } @@ -198,10 +213,13 @@ */ if(sys_fcntl_long(fsp->fh->fd, F_OPLKACK, OP_REVOKE) < 0) { if( DEBUGLVL( 0 )) { - dbgtext("irix_release_kernel_oplock: Error when removing kernel oplock on file " ); - dbgtext("%s, dev = %x, inode = %.0f, file_id = %ul. Error was %s\n", + dbgtext("irix_release_kernel_oplock: Error when " + "removing kernel oplock on file " ); + dbgtext("%s, dev = %x, inode = %.0f, file_id = %ul. " + "Error was %s\n", fsp->fsp_name, (unsigned int)fsp->dev, - (double)fsp->inode, fsp->fh->file_id, strerror(errno) ); + (double)fsp->inode, fsp->fh->file_id, + strerror(errno) ); } } } @@ -249,8 +267,8 @@ return NULL; if(pipe(pfd) != 0) { - DEBUG(0,("setup_kernel_oplock_pipe: Unable to create pipe. Error was %s\n", - strerror(errno) )); + DEBUG(0,("setup_kernel_oplock_pipe: Unable to create pipe. " + "Error was %s\n", strerror(errno) )); return False; }