Add more logging to track down disk I/O errors.

Bug: 6538393
Change-Id: Iaa20c8bc01c53da08ff18cb1efae80c2be0b0584
diff --git a/dist/sqlite3.c b/dist/sqlite3.c
index d8bc421..abe6186 100644
--- a/dist/sqlite3.c
+++ b/dist/sqlite3.c
@@ -28484,7 +28484,7 @@
   SimulateIOError( rc=1 );
   if( rc!=0 ){
     ((unixFile*)id)->lastErrno = errno;
-    return SQLITE_IOERR_FSTAT;
+    return unixLogError(SQLITE_IOERR_FSTAT, "fstat", ((unixFile*)id)->zPath);
   }
   *pSize = buf.st_size;
 
@@ -28519,7 +28519,9 @@
     i64 nSize;                    /* Required file size */
     struct stat buf;              /* Used to hold return values of fstat() */
    
-    if( osFstat(pFile->h, &buf) ) return SQLITE_IOERR_FSTAT;
+    if( osFstat(pFile->h, &buf) ) {
+      return unixLogError(SQLITE_IOERR_FSTAT, "fstat", pFile->zPath);
+    }
 
     nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk;
     if( nSize>(i64)buf.st_size ){
@@ -28917,7 +28919,7 @@
     ** with the same permissions.
     */
     if( osFstat(pDbFd->h, &sStat) && pInode->bProcessLock==0 ){
-      rc = SQLITE_IOERR_FSTAT;
+      rc = unixLogError(SQLITE_IOERR_FSTAT, "fstat", pDbFd->zPath);
       goto shm_open_err;
     }
 
@@ -30006,7 +30008,7 @@
       *pUid = sStat.st_uid;
       *pGid = sStat.st_gid;
     }else{
-      rc = SQLITE_IOERR_FSTAT;
+      rc = unixLogError(SQLITE_IOERR_FSTAT, "stat", zDb);
     }
   }else if( flags & SQLITE_OPEN_DELETEONCLOSE ){
     *pMode = 0600;