Re: [Nbd] NBD, DISCARD/TRIM
- To: folkert <folkert@...421...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] NBD, DISCARD/TRIM
- From: Paul Clements <paul.clements@...856...>
- Date: Thu, 21 Mar 2013 14:12:52 -0400
- Message-id: <CAECXXi5N6RpC8=YcWFaiwH2oBA8aJHRvcwLJg_Hw14ESL1+bnA@...18...>
- In-reply-to: <20130319180641.GD4508@...855...>
- References: <20130319145642.GA4508@...855...> <CAECXXi5Co05GJrHe-8gskN-=ZBwHW-jchUb9CNwLWkOH67v=EQ@...18...> <20130319160149.GB4508@...855...> <20130319180641.GD4508@...855...>
On Tue, Mar 19, 2013 at 2:06 PM, folkert <folkert@...421...> wrote:
>> > > Am I right that discard/trim is in kernel 3.9? Or is it already in 3.8?
>> > Patch was merged into Linus's tree on 5Oct12, so it should have made 3.7.
>>
>> There are problems with it, it seems.
Doesn't seem to be anything related to trim/discard. Does your kernel
have the kill_bdev calls in nbd? Look for:
@@ -627,6 +635,7 @@ static int __nbd_ioctl(struct block_devi
nbd_clear_que(nbd);
BUG_ON(!list_empty(&nbd->queue_head));
BUG_ON(!list_empty(&nbd->waiting_queue));
+ kill_bdev(bdev);
if (file)
fput(file);
return 0;
@@ -719,6 +728,7 @@ static int __nbd_ioctl(struct block_devi
nbd->file = NULL;
nbd_clear_que(nbd);
dev_warn(disk_to_dev(nbd->disk), "queue cleared\n");
+ kill_bdev(bdev);
queue_flag_clear_unlocked(QUEUE_FLAG_DISCARD, nbd->disk->queue);
if (file)
fput(file);
Reply to: