Re: [PATCH] memstick: add support for legacy memorysticks

2013-07-17 Thread Andrew Morton
On Mon, 8 Jul 2013 23:54:55 +0300 Maxim Levitsky wrote: > Based partially on MS standard spec quotes from Alex Dubov. > > As any code that works with user data this driver isn't > recommended to use to write cards that contain valuable data. > > It tries its best though to avoid data

Re: [PATCH] memstick: add support for legacy memorysticks

2013-07-17 Thread Andrew Morton
On Mon, 8 Jul 2013 23:54:55 +0300 Maxim Levitsky maximlevit...@gmail.com wrote: Based partially on MS standard spec quotes from Alex Dubov. As any code that works with user data this driver isn't recommended to use to write cards that contain valuable data. It tries its best though to

Re: [PATCH] memstick: add support for legacy memorysticks

2013-07-11 Thread Andrew Morton
On Thu, 11 Jul 2013 03:28:37 +0300 Maxim Levitsky wrote: > On Mon, 2013-07-08 at 23:54 +0300, Maxim Levitsky wrote: > > Based partially on MS standard spec quotes from Alex Dubov. > > > > As any code that works with user data this driver isn't > > recommended to use to write cards that

Re: [PATCH] memstick: add support for legacy memorysticks

2013-07-11 Thread Andrew Morton
On Thu, 11 Jul 2013 03:28:37 +0300 Maxim Levitsky maximlevit...@gmail.com wrote: On Mon, 2013-07-08 at 23:54 +0300, Maxim Levitsky wrote: Based partially on MS standard spec quotes from Alex Dubov. As any code that works with user data this driver isn't recommended to use to write

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-24 Thread Tejun Heo
Hello, On Mon, Sep 24, 2012 at 08:24:37PM +0200, Maxim Levitsky wrote: > Should have looked through the source. Understand now. > Just one quick question, should I create my own workqueue or use > schedule_work? if I use the later and my work function sleeps, will it > harmfully affect other

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-24 Thread Tejun Heo
Hello, On Mon, Sep 24, 2012 at 08:19:28PM +0200, Maxim Levitsky wrote: > Except that if I schedule a same work item few times, these work items > will be 'processed' in parallel, although there is just one work to do, > work of pulling the requests from block queue until it has them, and >

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-24 Thread Maxim Levitsky
On Mon, 2012-09-24 at 20:19 +0200, Maxim Levitsky wrote: > On Mon, 2012-09-24 at 11:05 -0700, Tejun Heo wrote: > > Hello, > > > > On Mon, Sep 24, 2012 at 05:09:23PM +0200, Maxim Levitsky wrote: > > > > Now that my exams done > > > > Can you spare me from using a workqueue? > > > > I'd much

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-24 Thread Maxim Levitsky
On Mon, 2012-09-24 at 11:05 -0700, Tejun Heo wrote: > Hello, > > On Mon, Sep 24, 2012 at 05:09:23PM +0200, Maxim Levitsky wrote: > > > Now that my exams done > > > Can you spare me from using a workqueue? > > I'd much prefer if you convert to workqueue. > > > > The point is that using

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-24 Thread Tejun Heo
Hello, On Mon, Sep 24, 2012 at 05:09:23PM +0200, Maxim Levitsky wrote: > > Now that my exams done > > Can you spare me from using a workqueue? I'd much prefer if you convert to workqueue. > > The point is that using current model I wake the worker thread as much > > as I want to, and I know

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-24 Thread Maxim Levitsky
On Mon, 2012-09-24 at 16:59 +0200, Maxim Levitsky wrote: > On Thu, 2012-09-20 at 10:53 -0700, Tejun Heo wrote: > > On Thu, Sep 20, 2012 at 07:05:42AM +0300, Maxim Levitsky wrote: > > > There can't be races in the driver, since it contains a single thread > > > that does all the IO it got from

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-24 Thread Maxim Levitsky
On Thu, 2012-09-20 at 10:53 -0700, Tejun Heo wrote: > On Thu, Sep 20, 2012 at 07:05:42AM +0300, Maxim Levitsky wrote: > > There can't be races in the driver, since it contains a single thread > > that does all the IO it got from block layer. > > The thread is awaken each time the request function

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-24 Thread Maxim Levitsky
On Thu, 2012-09-20 at 10:53 -0700, Tejun Heo wrote: On Thu, Sep 20, 2012 at 07:05:42AM +0300, Maxim Levitsky wrote: There can't be races in the driver, since it contains a single thread that does all the IO it got from block layer. The thread is awaken each time the request function of

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-24 Thread Maxim Levitsky
On Mon, 2012-09-24 at 16:59 +0200, Maxim Levitsky wrote: On Thu, 2012-09-20 at 10:53 -0700, Tejun Heo wrote: On Thu, Sep 20, 2012 at 07:05:42AM +0300, Maxim Levitsky wrote: There can't be races in the driver, since it contains a single thread that does all the IO it got from block

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-24 Thread Tejun Heo
Hello, On Mon, Sep 24, 2012 at 05:09:23PM +0200, Maxim Levitsky wrote: Now that my exams done Can you spare me from using a workqueue? I'd much prefer if you convert to workqueue. The point is that using current model I wake the worker thread as much as I want to, and I know that it

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-24 Thread Maxim Levitsky
On Mon, 2012-09-24 at 11:05 -0700, Tejun Heo wrote: Hello, On Mon, Sep 24, 2012 at 05:09:23PM +0200, Maxim Levitsky wrote: Now that my exams done Can you spare me from using a workqueue? I'd much prefer if you convert to workqueue. The point is that using current model I

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-24 Thread Maxim Levitsky
On Mon, 2012-09-24 at 20:19 +0200, Maxim Levitsky wrote: On Mon, 2012-09-24 at 11:05 -0700, Tejun Heo wrote: Hello, On Mon, Sep 24, 2012 at 05:09:23PM +0200, Maxim Levitsky wrote: Now that my exams done Can you spare me from using a workqueue? I'd much prefer if you

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-24 Thread Tejun Heo
Hello, On Mon, Sep 24, 2012 at 08:19:28PM +0200, Maxim Levitsky wrote: Except that if I schedule a same work item few times, these work items will be 'processed' in parallel, although there is just one work to do, work of pulling the requests from block queue until it has them, and

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-24 Thread Tejun Heo
Hello, On Mon, Sep 24, 2012 at 08:24:37PM +0200, Maxim Levitsky wrote: Should have looked through the source. Understand now. Just one quick question, should I create my own workqueue or use schedule_work? if I use the later and my work function sleeps, will it harmfully affect other users of

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-20 Thread Tejun Heo
On Thu, Sep 20, 2012 at 07:05:42AM +0300, Maxim Levitsky wrote: > There can't be races in the driver, since it contains a single thread > that does all the IO it got from block layer. > The thread is awaken each time the request function of block device is > called. > This why I didn't do much

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-20 Thread Tejun Heo
Hello, Andrew. On Wed, Sep 19, 2012 at 02:52:28PM -0700, Andrew Morton wrote: > I have a bunch of fairly trivial comments, and one head-scratcher for > Tejun: what's up with the local-irqs-disabled requirement in sg_miter_next()? > > +static bool sg_compare_to_buffer(struct scatterlist *sg, > >

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-20 Thread Tejun Heo
Hello, Andrew. On Wed, Sep 19, 2012 at 02:52:28PM -0700, Andrew Morton wrote: I have a bunch of fairly trivial comments, and one head-scratcher for Tejun: what's up with the local-irqs-disabled requirement in sg_miter_next()? +static bool sg_compare_to_buffer(struct scatterlist *sg, +

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-20 Thread Tejun Heo
On Thu, Sep 20, 2012 at 07:05:42AM +0300, Maxim Levitsky wrote: There can't be races in the driver, since it contains a single thread that does all the IO it got from block layer. The thread is awaken each time the request function of block device is called. This why I didn't do much locking

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-19 Thread Maxim Levitsky
On Wed, 2012-09-19 at 14:52 -0700, Andrew Morton wrote: > On Wed, 19 Sep 2012 16:19:02 +0300 > Maxim Levitsky wrote: > > > Based partially on MS standard spec quotes from Alex Dubov. > > > > As any code that works with user data this driver isn't > > recommended to use to write cards that

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-19 Thread Andrew Morton
On Wed, 19 Sep 2012 16:19:02 +0300 Maxim Levitsky wrote: > Based partially on MS standard spec quotes from Alex Dubov. > > As any code that works with user data this driver isn't > recommended to use to write cards that contain valuable data. > > It tries its best though to avoid data

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-19 Thread Andrew Morton
On Wed, 19 Sep 2012 16:19:02 +0300 Maxim Levitsky maximlevit...@gmail.com wrote: Based partially on MS standard spec quotes from Alex Dubov. As any code that works with user data this driver isn't recommended to use to write cards that contain valuable data. It tries its best though to

Re: [PATCH] memstick: add support for legacy memorysticks

2012-09-19 Thread Maxim Levitsky
On Wed, 2012-09-19 at 14:52 -0700, Andrew Morton wrote: On Wed, 19 Sep 2012 16:19:02 +0300 Maxim Levitsky maximlevit...@gmail.com wrote: Based partially on MS standard spec quotes from Alex Dubov. As any code that works with user data this driver isn't recommended to use to write