1. 11 7月, 2014 5 次提交
    • L
      drbd: use drbd_device_post_work() in more places · ac0acb9e
      Lars Ellenberg 提交于
      This replaces the md_sync_work member of struct drbd_device
      by a new MD_SYNC "work bit" in device->flags.
      
      This replaces the resync_start_work member of struct drbd_device
      by a new RS_START "work bit" in device->flags.
      Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
      Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
      ac0acb9e
    • L
      drbd: make sure disk cleanup happens in worker context · e334f550
      Lars Ellenberg 提交于
      The recent fix to put_ldev() (correct ordering of access to local_cnt
      and state.disk; memory barrier in __drbd_set_state) guarantees
      that the cleanup happens exactly once.
      
      However it does not yet guarantee that the cleanup happens from worker
      context, the last put_ldev() may still happen from atomic context,
      which must not happen: blkdev_put() may sleep.
      
      Fix this by scheduling the cleanup to the worker instead,
      using a couple more bits in device->flags and a new helper,
      drbd_device_post_work().
      
      Generalized the "resync progress" work to cover these new work bits.
      Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
      Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
      e334f550
    • L
      drbd: fix resync finished detection · 5ab7d2c0
      Lars Ellenberg 提交于
      This fixes one recent regresion,
      and one long existing bug.
      
      The bug:
      drbd_try_clear_on_disk_bm() assumed that all "count" bits have to be
      accounted in the resync extent corresponding to the start sector.
      
      Since we allow application requests to cross our "extent" boundaries,
      this assumption is no longer true, resulting in possible misaccounting,
      scary messages
      ("BAD! sector=12345s enr=6 rs_left=-7 rs_failed=0 count=58 cstate=..."),
      and potentially, if the last bit to be cleared during resync would
      reside in previously misaccounted resync extent, the resync would never
      be recognized as finished, but would be "stalled" forever, even though
      all blocks are in sync again and all bits have been cleared...
      
      The regression was introduced by
          drbd: get rid of atomic update on disk bitmap works
      
      For an "empty" resync (rs_total == 0), we must not "finish" the
      resync on the SyncSource before the SyncTarget knows all relevant
      information (sync uuid).  We need to wait for the full round-trip,
      the SyncTarget will then explicitly notify us.
      
      Also for normal, non-empty resyncs (rs_total > 0), the resync-finished
      condition needs to be tested before the schedule() in wait_for_work, or
      it is likely to be missed.
      Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
      Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
      5ab7d2c0
    • L
      drbd: fix a race stopping the worker thread · a80ca1ae
      Lars Ellenberg 提交于
      We may implicitly call drbd_send() from inside wait_for_work(),
      via maybe_send_barrier().
      
      If the "stop" signal was send just before that, drbd_send() would call
      flush_signals(), and we would run an unbounded schedule() afterwards.
      
      Fix: check for thread_state == RUNNING before we schedule()
      Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
      Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
      a80ca1ae
    • L
      drbd: get rid of atomic update on disk bitmap works · c7a58db4
      Lars Ellenberg 提交于
      Just trigger the occasional lazy bitmap write-out during resync
      from the central wait_for_work() helper.
      
      Previously, during resync, bitmap pages would be written out separately,
      synchronously, one at a time, at least 8 times each (every 512 bytes
      worth of bitmap cleared).
      
      Now we trigger "merge friendly" bulk write out of all cleared pages
      every two seconds during resync, and once the resync is finished.
      Most pages will be written out only once.
      Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
      Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
      c7a58db4
  2. 10 7月, 2014 1 次提交
  3. 01 5月, 2014 6 次提交
  4. 17 2月, 2014 21 次提交
  5. 24 11月, 2013 1 次提交
    • K
      block: Convert bio_for_each_segment() to bvec_iter · 7988613b
      Kent Overstreet 提交于
      More prep work for immutable biovecs - with immutable bvecs drivers
      won't be able to use the biovec directly, they'll need to use helpers
      that take into account bio->bi_iter.bi_bvec_done.
      
      This updates callers for the new usage without changing the
      implementation yet.
      Signed-off-by: NKent Overstreet <kmo@daterainc.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: "Ed L. Cashin" <ecashin@coraid.com>
      Cc: Nick Piggin <npiggin@kernel.dk>
      Cc: Lars Ellenberg <drbd-dev@lists.linbit.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Paul Clements <Paul.Clements@steeleye.com>
      Cc: Jim Paris <jim@jtan.com>
      Cc: Geoff Levand <geoff@infradead.org>
      Cc: Yehuda Sadeh <yehuda@inktank.com>
      Cc: Sage Weil <sage@inktank.com>
      Cc: Alex Elder <elder@inktank.com>
      Cc: ceph-devel@vger.kernel.org
      Cc: Joshua Morris <josh.h.morris@us.ibm.com>
      Cc: Philip Kelleher <pjk1939@linux.vnet.ibm.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: linux390@de.ibm.com
      Cc: Nagalakshmi Nandigama <Nagalakshmi.Nandigama@lsi.com>
      Cc: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
      Cc: support@lsi.com
      Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Guo Chao <yan@linux.vnet.ibm.com>
      Cc: Asai Thambi S P <asamymuthupa@micron.com>
      Cc: Selvan Mani <smani@micron.com>
      Cc: Sam Bradshaw <sbradshaw@micron.com>
      Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
      Cc: Keith Busch <keith.busch@intel.com>
      Cc: Stephen Hemminger <shemminger@vyatta.com>
      Cc: Quoc-Son Anh <quoc-sonx.anh@intel.com>
      Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
      Cc: Nitin Gupta <ngupta@vflare.org>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Jerome Marchand <jmarchan@redhat.com>
      Cc: Seth Jennings <sjenning@linux.vnet.ibm.com>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Mike Snitzer <snitzer@redhat.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: "Darrick J. Wong" <darrick.wong@oracle.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: linux-m68k@lists.linux-m68k.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: drbd-user@lists.linbit.com
      Cc: nbd-general@lists.sourceforge.net
      Cc: cbe-oss-dev@lists.ozlabs.org
      Cc: xen-devel@lists.xensource.com
      Cc: virtualization@lists.linux-foundation.org
      Cc: linux-raid@vger.kernel.org
      Cc: linux-s390@vger.kernel.org
      Cc: DL-MPTFusionLinux@lsi.com
      Cc: linux-scsi@vger.kernel.org
      Cc: devel@driverdev.osuosl.org
      Cc: linux-fsdevel@vger.kernel.org
      Cc: cluster-devel@redhat.com
      Cc: linux-mm@kvack.org
      Acked-by: NGeoff Levand <geoff@infradead.org>
      7988613b
  6. 29 3月, 2013 2 次提交
  7. 23 3月, 2013 2 次提交
  8. 09 11月, 2012 2 次提交