[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] nbd & discard/trim

OK, attached are the two patches that I have queued. The first adds
the SET_FLAGS ioctl. The second adds the TRIM/DISCARD support. Once
people have had a chance to review and (ideally) test the patches I'll
push to mainline. In particular, can someone please verify these
patches are compatible with current nbd tools -- specifically the
ioctl and flag values. I think I've got those right, but I'd like to
be sure.


On Mon, Aug 13, 2012 at 9:31 AM, Paul Clements
<paul.clements@...856...> wrote:
> On Thu, Aug 9, 2012 at 11:35 AM, folkert <folkert@...421...> wrote:
>>> >> What is the current way to enable discard/trim on an nbd block device?
>>> >> My nbd server sends the appropriate flags:
>>> >>       int flags = 1 + 4 + 8 + 32; // FLAGS, FLUSH, FUA, TRIM
>>> >> nbd-client package is of version: 1:3.2-1
>>> >> connected as:
>>> >>       nbd-client bs=1024 12341 /dev/nbd0
>>> >> but still mounting with e.g. -o noatime,discard fails.
>>> >
>>> > I believe the patch isn't in the kernel yet. Paul?
>>> That's correct. The patch has not gone into mainline.
>> Do you have an estimate when it will be in mainline?
> Let me take a look back at the patch and see if we can get this in in
> the next couple weeks.
> Thanks,
> Paul

Attachment: nbd-set-flags-ioctl.diff
Description: Binary data

Attachment: nbd-trim-discard-support.diff
Description: Binary data

Reply to: