From owner-freebsd-hackers@freebsd.org Tue Dec 8 19:05:54 2015 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A3509D404A for ; Tue, 8 Dec 2015 19:05:54 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ob0-x234.google.com (mail-ob0-x234.google.com [IPv6:2607:f8b0:4003:c01::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A6411748 for ; Tue, 8 Dec 2015 19:05:54 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by obcse5 with SMTP id se5so19391481obc.3 for ; Tue, 08 Dec 2015 11:05:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=o0lHkCGi8L4y3ENCkALou+GK8dB9k2vSDCm6p11zUE0=; b=IyyIT5v4Py2GsHTsAFyyTPwLNKElG/QPOFXvbF/7Zy0Ux/XMB34zCJiQk7ybS58DjP rXxr6yq7zA98dFnDS0wU0hMAl8sOjE8DGkr+HP9w3VpK1D/w1MtcgVx87hrv9KlPUYmG rODoKJJGLPxzr4d61Nu5w7tttkee6PvUVoaZXQfWI/TEOOvxSJtqq7yUkHplsBow/78U wYCXtalD/w0ilecphhnF/AjhHDB4NMtA2Soi3LSphQNoirCc/sGDqokdqND0R1ydzaAX qSIiQurJeEKr+K9BZEAW7NRNN1ouGWVpk47dMP0WroQaaaUTeDdLPW/JbM4XinDxVIg3 19/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=o0lHkCGi8L4y3ENCkALou+GK8dB9k2vSDCm6p11zUE0=; b=cZ+8hGmfeFHhloc3Zi0fWkEhkix5CxRFCacRKW58C+zLi01WbKMYuLV03BoHZZsU/R SPZWdF3jL15wJCGBlWnQ3CCNipFUn4yOWCtCuLRwd0/jq4Wb7mMcYn1DZtkzIIjzUnGI Ts7za0fbEfl+2Xb2OFOs7nUbd7v8hLcZRl5u6eCySAoS04pp8v/3uhEF2lRL4xTQWfuj vefsTomWzRHYVGJD7HvR7i/5uvBqxV4CgZf8ZKoOkb4M0Ije4Z4rq5Ea1ZbG52PmOOAz 11U7f6WiHGf3uV+5dkWdGpxUPA9n8z3uWygGaEzLNKaa8RyBSKOpCjqcNNKhCPAo4SGe 3IVg== X-Gm-Message-State: ALoCoQmWDJZ3FHmQiNPlLqnHdK0dLsZiI3qc8+AjXp7J/mUNWEI3hDHMNZ5tbxTnzeUgS58KVIry4XwmLlxXReAob9waDobJgQ== X-Received: by 10.182.58.35 with SMTP id n3mr1063767obq.46.1449601553432; Tue, 08 Dec 2015 11:05:53 -0800 (PST) Received: from ?IPv6:2601:280:4900:3700:4d3f:8eba:ea86:7700? ([2601:280:4900:3700:4d3f:8eba:ea86:7700]) by smtp.gmail.com with ESMTPSA id ct9sm1876772oec.15.2015.12.08.11.05.52 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Dec 2015 11:05:52 -0800 (PST) Sender: Warner Losh Subject: Re: DELETE support in the VOP_STRATEGY(9)? Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_76B38211-5D68-4DB3-812A-059CA44B4757"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <86twnur25s.fsf@desk.des.no> Date: Tue, 8 Dec 2015 12:05:51 -0700 Cc: Maxim Sobolev , FreeBSD Hackers , Pawel Jakub Dawidek , Eitan Adler Message-Id: References: <86twnur25s.fsf@desk.des.no> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2015 19:05:54 -0000 --Apple-Mail=_76B38211-5D68-4DB3-812A-059CA44B4757 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Dec 7, 2015, at 3:19 AM, Dag-Erling Sm=C3=B8rgrav = wrote: >=20 > Maxim Sobolev writes: >> Hi folks, do we support delete operation in the vnode layer? This >> comes from observation that md(4) converts from DELETE into >> sector-size zero buffer write before it feeds it to the vnode. >=20 > As the person who implemented this (because I needed a reliable way to > test fsck_ffs -E): it is currently the only possible action, other = than > to ignore the request - which is actually fine since BIO_DELETE is not > guaranteed to do anything whatsoever, except not corrupt data you = didn't > want deleted. >=20 > I'm not opposed to the idea of VOP_DELETE or similar, but don't assume > that "punching through" is always the correct semantic, and don't = assume > that it will be easy to implement - and it will have to be implemented > correctly at every layer, in every geom, in every storage driver etc. > There are many details to work out and many opportunities for = mistakes. > Remember that BIO_DELETE is strictly advisory. Should VOP_DELETE also > be advisory, or do we want to guarantee that a VOP_DELETEd region = reads > back as all zeroes? Remember that we can't guarantee that the data = will > be removed from the underlying medium, or verify that it was. How do = we > handle an unaligned VOP_DELETE? Should a VOP_DELETE create a hole if > the filesystem support holes? Since you mentioned VMs, this could > result in fragmentation of initially unfragmented (preallocated) disk > images. http://man7.org/linux/man-pages/man2/fallocate.2.html would answer those questions. Warner --Apple-Mail=_76B38211-5D68-4DB3-812A-059CA44B4757 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJWZyoPAAoJEGwc0Sh9sBEAxUUQANrYKp/07D1peZqYseAGqdhj AhwT+5V0vaNyWiwH6CUVrlrqXfp5kM2Uu8AqiEW42zuUhdhl7nQDfAP1j4ipr9lA nOo+Oln4h8kChXyoz73o02te8FlWmnwPn2bt9k7U6cE1H0oMra+PDBsL5taOQmJO obj77YtjlNZ+Y7Z/kHFjePx58aathLms+E2AuvL4HKJUjLZNFhly7lK85HYEQQyL 0aUQ+ZtYKdCfGtH05BkDtvDRqM6Pklic9qp34e2hqCNZRAov5u40YUzOAFdeaRLz pUta/weAl1FvmuXxTEbGZdguBBYtYsCv5vCM5out6w8TmcyMkPGJMgHqrdQBNeDk 6kL+8iJZPVkD5itvMdb2rxJdl+TZRr+XBAd16LT83j7ZyPMzikFbUNMvPV/rTL6s ViZSzkbVmRbqmH4xRa5qIgcPx+ek1L0ZSnlA5PZAn74JTduR3KZQ+WbALYOW4Fre Aa1LGiD0A9sDDOoBzIe68vV0B1y120yxP3iWoNpo/pgsq/c0Jttl3laimb69FtP6 bWJ9tr9f7Y1CZlxYocgE5rE7DhzEje/KfhRJa49njPeeskvFnHlMo/Evlmlziihf 38eXw7NSmgQHCBPvxxTlx0Da4EQpyIg12Qylx9RCVTdsIQJ1V2eTQ0RCmxXEZToW mO7TMPAfcrSG6WZFfpB4 =h127 -----END PGP SIGNATURE----- --Apple-Mail=_76B38211-5D68-4DB3-812A-059CA44B4757--