From mboxrd@z Thu Jan 1 00:00:00 1970 From: Theodore Ts'o Subject: Re: [RFC] Draft Linux kernel interfaces for SMR/ZBC drives Date: Tue, 11 Feb 2014 14:53:45 -0500 Message-ID: <20140211195345.GB11971@thunk.org> References: <20140211184343.GA11971@thunk.org> <1E60E599-9CF1-4DD8-AE19-B1073858629D@dilger.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel To: Andreas Dilger Return-path: Received: from imap.thunk.org ([74.207.234.97]:56644 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755476AbaBKTxt (ORCPT ); Tue, 11 Feb 2014 14:53:49 -0500 Content-Disposition: inline In-Reply-To: <1E60E599-9CF1-4DD8-AE19-B1073858629D@dilger.ca> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Feb 11, 2014 at 12:04:12PM -0700, Andreas Dilger wrote: > > Should ZBCRESETZONE take a length or number of zones to reset? I was assuming that we would reset one zone at a time, which I think is the main way this would be used. Thinking about this some more, one other way we could do is to reuse BLKDISCARD, with the restriction that the starting LBA (offset) must be the first LBA for a zone, and offset + length - 1 must be last LBA for a zone. If either of these restrictions are violated, then BLKDISCARD would return EINVAL --- or maybe some other error code, since EINVAL can also mean an invalid ioctl code. Hmm... ERANGE would be good, but the strerror(ERANGE) returns "Math result not representable", which would be highly confusing, although it falls within the grand tradition of confusing Unix error messages, such as "not a typewriter". :-) Any other suggestions? - Ted