Whamcloud - gitweb
Land b1_4_smallfix onto b1_4 (20040804_1301)
authoradilger <adilger>
Wed, 4 Aug 2004 20:33:36 +0000 (20:33 +0000)
committeradilger <adilger>
Wed, 4 Aug 2004 20:33:36 +0000 (20:33 +0000)
- use transno after validating reply (3892)
- use different name for 2nd ptlrpcd thread (3887)
- fix mds_postrecov to initialize import for llog ctxt (3121)
- be sure to send a reply for a CANCEL rpc with bad export (3863)
- don't allow enqueue to complete on a destroyed export (3822)
- down write_lock before checking llog header bitmap (3825)
- recover from lock replay timeout (3764)
- replace some LBUG about llog ops with error handling (3841)
- add libwrap support for the TCP acceptor (3996)
- install man pages and include them in rpms (3100)
- add new init script for (un)mounting lustre filesystems (2593)
- run chkconfig in %post for init scripts (3701)
- drop scimac NAL (unmaintained)

lustre/lvfs/llog.c

index cf9daf7..1b4c1df 100644 (file)
@@ -100,17 +100,23 @@ int llog_cancel_rec(struct llog_handle *loghandle, int index)
             (le32_to_cpu(llh->llh_count) == 1) &&
             (loghandle->lgh_last_idx == (LLOG_BITMAP_BYTES * 8) - 1)) {
                 rc = llog_destroy(loghandle);
-                if (rc)
+                if (rc) {
                         CERROR("failure destroying log after last cancel: %d\n",
                                rc);
-                LASSERT(rc == 0);
-                RETURN(1);
+                        ext2_set_bit(index, llh->llh_bitmap);
+                        llh->llh_count++;
+                } else {
+                        rc = 1;
+                }
+                RETURN(rc);
         }
 
         rc = llog_write_rec(loghandle, &llh->llh_hdr, NULL, 0, NULL, 0);
-        if (rc)
+        if (rc) {
                 CERROR("failure re-writing header %d\n", rc);
-        LASSERT(rc == 0);
+                        ext2_set_bit(index, llh->llh_bitmap);
+                        llh->llh_count++;
+        }
         RETURN(rc);
 }
 EXPORT_SYMBOL(llog_cancel_rec);