| To: | "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>, "axboe@xxxxxxxxx" <axboe@xxxxxxxxx>, "akpm@xxxxxxxxxxxxxxxxxxxx" <akpm@xxxxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH v2 3/3] block: implement (some of) fallocate for block devices |
| From: | Bart Van Assche <bart.vanassche@xxxxxxxxxxx> |
| Date: | Thu, 29 Sep 2016 13:08:57 -0700 |
| Authentication-results: | spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=sandisk.com; |
| Cc: | "hch@xxxxxxxxxxxxx" <hch@xxxxxxxxxxxxx>, "tytso@xxxxxxx" <tytso@xxxxxxx>, "martin.petersen@xxxxxxxxxx" <martin.petersen@xxxxxxxxxx>, "snitzer@xxxxxxxxxx" <snitzer@xxxxxxxxxx>, "linux-api@xxxxxxxxxxxxxxx" <linux-api@xxxxxxxxxxxxxxx>, "bfoster@xxxxxxxxxx" <bfoster@xxxxxxxxxx>, "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>, "linux-block@xxxxxxxxxxxxxxx" <linux-block@xxxxxxxxxxxxxxx>, "dm-devel@xxxxxxxxxx" <dm-devel@xxxxxxxxxx>, "linux-fsdevel@xxxxxxxxxxxxxxx" <linux-fsdevel@xxxxxxxxxxxxxxx> |
| Delivered-to: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=gyICqeO3j/Ely50lY9DR2TR5SsU9nhDdYth/xTud4JQ=; b=jKXIswZzLT6bI9EiRJ6zZhil1y80iHKyWTodaz/psERQbD35Dh3cpuf5kpcz1n2UWjXFNBn4JQSgL0NkJdvqV4zCHc1F4vbNVSPc0MujEIqMsod4fZKWblxTrGk0QD44xeEJy26LT0gBM+cm0l6NVDha65CjVM4Yf+Jv3xQuBmY= |
| In-reply-to: | <20160929021900.GA4901@xxxxxxxxxxxxxxxx> |
| References: | <147510957066.8940.13803086684642725401.stgit@xxxxxxxxxxxxxxxx> <147510959149.8940.2897845352082568677.stgit@xxxxxxxxxxxxxxxx> <20160929021900.GA4901@xxxxxxxxxxxxxxxx> |
| Spamdiagnosticmetadata: | NSPM |
| Spamdiagnosticoutput: | 1:99 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 09/28/2016 07:19 PM, Darrick J. Wong wrote: After much discussion, it seems that the fallocate feature flag FALLOC_FL_ZERO_RANGE maps nicely to SCSI WRITE SAME; and the feature FALLOC_FL_PUNCH_HOLE maps nicely to the devices that have been whitelisted for zeroing SCSI UNMAP. Punch still requires that FALLOC_FL_KEEP_SIZE is set. A length that goes past the end of the device will be clamped to the device size if KEEP_SIZE is set; or will return -EINVAL if not. Both start and length must be aligned to the device's logical block size. Since the semantics of fallocate are fairly well established already, wire up the two pieces. The other fallocate variants (collapse range, insert range, and allocate blocks) are not supported. For the FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE | FALLOC_FL_NO_HIDE_STALE case, it's probably safer not to try to send a discard to block devices that do not support discard in order not to hit block driver bugs. But that's something we can still discuss later. Hence: Reviewed-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx> |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] [RFC] Release buffer locks in case of IO error, Carlos Maiolino |
|---|---|
| Next by Date: | Re: aio completions vs file_accessed race, was: Re: [PATCH 7/8] xfs: split direct I/O and DAX path, Christoph Hellwig |
| Previous by Thread: | [PATCH v2 3/3] block: implement (some of) fallocate for block devices, Darrick J. Wong |
| Next by Thread: | Re: [PATCH v2 3/3] block: implement (some of) fallocate for block devices, Darrick J. Wong |
| Indexes: | [Date] [Thread] [Top] [All Lists] |