]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
fileserver: add volume number to error-messages
authorChristof Hanke <christof.hanke@rzg.mpg.de>
Wed, 22 Aug 2012 14:39:13 +0000 (16:39 +0200)
committerStephan Wiesand <stephan.wiesand@desy.de>
Tue, 26 Mar 2013 11:37:36 +0000 (04:37 -0700)
in physio. If things go wrong in ReallyRead() or
ReallyWrite(), the admin would like to know which
volume to salvage.

Reviewed-on: http://gerrit.openafs.org/8010
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 185699e631ec3548bb6d1e68302d4a652632d3e6)

Change-Id: I0bc7fa31db17fc438e4c9852d685984747fb9b74
Reviewed-on: http://gerrit.openafs.org/9491
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/viced/physio.c

index b56465d51f7ef1aaeaa2154a6a28cda15f62968e..26499a321aadfe05d7aaebf887bdb6c09919035b 100644 (file)
@@ -58,10 +58,10 @@ ReallyRead(DirHandle * file, int block, char *data)
     if (fdP == NULL) {
        code = errno;
        ViceLog(0,
-               ("ReallyRead(): open failed device %X inode %s errno %d\n",
+               ("ReallyRead(): open failed device %X inode %s (volume=%u) errno %d\n",
                 file->dirh_handle->ih_dev, PrintInode(stmp,
                                                       file->dirh_handle->
-                                                      ih_ino), code));
+                                                      ih_ino), file->dirh_handle->ih_vid,code));
        return code;
     }
     rdlen = FDH_PREAD(fdP, data, PAGESIZE, ((afs_foff_t)block) * PAGESIZE);
@@ -71,10 +71,10 @@ ReallyRead(DirHandle * file, int block, char *data)
        else
            code = EIO;
        ViceLog(0,
-               ("ReallyRead(): read failed device %X inode %s errno %d\n",
+               ("ReallyRead(): read failed device %X inode %s (volume=%u) errno %d\n",
                 file->dirh_handle->ih_dev, PrintInode(stmp,
                                                       file->dirh_handle->
-                                                      ih_ino), code));
+                                                      ih_ino), file->dirh_handle->ih_vid,code));
        FDH_REALLYCLOSE(fdP);
        return code;
     }
@@ -94,19 +94,19 @@ ReallyWrite(DirHandle * file, int block, char *data)
     fdP = IH_OPEN(file->dirh_handle);
     if (fdP == NULL) {
        ViceLog(0,
-               ("ReallyWrite(): open failed device %X inode %s errno %d\n",
+               ("ReallyWrite(): open failed device %X inode %s (volume=%u) errno %d\n",
                 file->dirh_handle->ih_dev, PrintInode(stmp,
                                                       file->dirh_handle->
-                                                      ih_ino), errno));
+                                                      ih_ino), file->dirh_handle->ih_vid,errno));
        lpErrno = errno;
        return 0;
     }
     if ((count = FDH_PWRITE(fdP, data, PAGESIZE, ((afs_foff_t)block) * PAGESIZE)) != PAGESIZE) {
        ViceLog(0,
-               ("ReallyWrite(): write failed device %X inode %s errno %d\n",
+               ("ReallyWrite(): write failed device %X inode %s (volume=%u) errno %d\n",
                 file->dirh_handle->ih_dev, PrintInode(stmp,
                                                       file->dirh_handle->
-                                                      ih_ino), errno));
+                                                      ih_ino), file->dirh_handle->ih_vid,errno));
        lpCount = count;
        lpErrno = errno;
        FDH_REALLYCLOSE(fdP);