Whamcloud - gitweb
LU-1943 ofd: save server last transaction number
authorMikhail Pershin <tappro@whamcloud.com>
Thu, 4 Oct 2012 05:17:53 +0000 (09:17 +0400)
committerOleg Drokin <green@whamcloud.com>
Sat, 6 Oct 2012 02:43:08 +0000 (22:43 -0400)
After reading server data from the last_rcvd file we must store the
last transaction number in lu_target.  Otherwise we write a zero last
transaction number back to last_rcvd, causing transaction numbers to
roll back to 2^32 every time the server is restarted.  This can lead
to 'server went back in time' client console errors.

Whamcloud-bug-id: ORI-670
Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Iaff4af3e4bd6fce0da1d1b0886147538c3300c1e
Reviewed-on: http://review.whamcloud.com/4190
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Ian Colle <Ian.Colle@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ofd/ofd_fs.c

index a21586d..ee01de2 100644 (file)
@@ -453,6 +453,7 @@ int ofd_server_data_init(const struct lu_env *env, struct ofd_device *ofd)
 
        cfs_spin_lock(&ofd->ofd_lut.lut_translock);
        obd->obd_last_committed = lsd->lsd_last_transno;
+       ofd->ofd_lut.lut_last_transno = lsd->lsd_last_transno;
        cfs_spin_unlock(&ofd->ofd_lut.lut_translock);
 
        /* save it, so mount count and last_transno is current */