Re: [PATCH v8 03/10] md: Neither resync nor reshape while the system is frozen

2017-10-12 Thread Shaohua Li
On Thu, Oct 12, 2017 at 04:59:01PM +, Bart Van Assche wrote: > On Wed, 2017-10-11 at 12:32 -0700, Shaohua Li wrote: > > On Wed, Oct 11, 2017 at 05:17:56PM +, Bart Van Assche wrote: > > > On Tue, 2017-10-10 at 18:48 -0700, Shaohua Li wrote: > > > > The proble

Re: [PATCH v8 03/10] md: Neither resync nor reshape while the system is frozen

2017-10-11 Thread Shaohua Li
On Wed, Oct 11, 2017 at 05:17:56PM +, Bart Van Assche wrote: > On Tue, 2017-10-10 at 18:48 -0700, Shaohua Li wrote: > > The problem is __md_stop_writes set some bit like MD_RECOVERY_FROZEN, which > > will prevent md_check_recovery restarting resync/reshape. I think we need >

Re: [PATCH v8 03/10] md: Neither resync nor reshape while the system is frozen

2017-10-10 Thread Shaohua Li
On Tue, Oct 10, 2017 at 11:33:06PM +, Bart Van Assche wrote: > On Tue, 2017-10-10 at 15:30 -0700, Shaohua Li wrote: > > On Tue, Oct 10, 2017 at 02:03:39PM -0700, Bart Van Assche wrote: > > > Some people use the md driver on laptops and use the suspend and > > >

Re: [PATCH v8 03/10] md: Neither resync nor reshape while the system is frozen

2017-10-10 Thread Shaohua Li
Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> > Cc: Shaohua Li <s...@kernel.org> > Cc: linux-r...@vger.kernel.org > Cc: Ming Lei <ming@redhat.com> > Cc: Christoph Hellwig <h...@lst.de> > Cc: Hannes Reinecke <h...@suse.com>

Re: [PATCH 10/29] drivers, md: convert stripe_head.count from atomic_t to refcount_t

2017-03-07 Thread Shaohua Li
On Mon, Mar 06, 2017 at 04:20:57PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations. >

Re: [PATCH 08/29] drivers, md: convert mddev.active from atomic_t to refcount_t

2017-03-07 Thread Shaohua Li
On Mon, Mar 06, 2017 at 04:20:55PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations.

Re: [PATCH v2 3/3] md: convert to use the generic badblocks code

2015-12-01 Thread Shaohua Li
On Wed, Nov 25, 2015 at 11:43:33AM -0700, Vishal Verma wrote: > Retain badblocks as part of rdev, but use the accessor functions from > include/linux/badblocks for all manipulation. > > Signed-off-by: Vishal Verma > --- > drivers/md/md.c | 507 >

Re: RFC: Allow block drivers to poll for I/O instead of sleeping

2013-07-03 Thread Shaohua Li
On Thu, Jun 20, 2013 at 04:17:13PM -0400, Matthew Wilcox wrote: A paper at FAST2012 (http://static.usenix.org/events/fast12/tech/full_papers/Yang.pdf) pointed out the performance overhead of taking interrupts for low-latency block I/Os. The solution the author investigated was to spin

Re: [PATCH 7/8] sd: Permit merged discard requests

2012-09-19 Thread Shaohua Li
On Tue, Sep 18, 2012 at 12:19:31PM -0400, Martin K. Petersen wrote: From: Martin K. Petersen martin.peter...@oracle.com Support requests with more than one bio payload for discards. The total number of bytes to be discarded is stored in req-__data_len and used in sd_done() to complete the