From owner-freebsd-hackers@freebsd.org Sat Apr 20 20:36:20 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EDAD1575457 for ; Sat, 20 Apr 2019 20:36:20 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from mail-ot1-f65.google.com (mail-ot1-f65.google.com [209.85.210.65]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B103E70FFB; Sat, 20 Apr 2019 20:36:19 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: by mail-ot1-f65.google.com with SMTP id 64so6768547otb.8; Sat, 20 Apr 2019 13:36:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KJ+//qPz+3Eyd3XANL/Jk+NqVmkj1LNs+Vn+ZuG0sGw=; b=lvPt6psDczKweKEkI7tbJh7mfjErP3jv7ngEg9DcciY1g7AqCM8XKpLpzkSHEaRwOI 6PW/ZZ37YKYH77JMmTkwad9+tFbx1NsD9cmZM5WlaVPmUw4dFp6yBa+Adlol79M70yzy i4Hd2o6MoATlNsv2d9XbsrfTcBP0EjVGVafdOAP4YPAXN8y5Zu0yXfvNoJZlRHh0ii69 TpAxIbLr6NvAJySjvRWKi1ZLR93ZfoEj3XnbrqdO12YNgN8KVb0ZrjbD8kbDvO/FdsS8 ix8yBeMFBVGxI+3tPnQc75mTntio6wVxlz3vbpSFwnZXF6gNXe41oZ0nubIgTPh2MiMc VDGw== X-Gm-Message-State: APjAAAUHCV5abhmhKyywfuOTkm8pmNQdmCXnURA4gRHc7AbJe7RWwKOg l51Sjr7F9BmY4o2bsqRnhQ8sOX1GBF6OPAQ0N8QbYQ== X-Google-Smtp-Source: APXvYqxxvAAbE4TcYJ+QFtj9f+QwStdXT2KD9wFsivL3zi+224frioZMQ7JO8m9jw6k3/OdO6LX15YFk1TM1FZIMATs= X-Received: by 2002:a9d:6292:: with SMTP id x18mr6795060otk.224.1555792573315; Sat, 20 Apr 2019 13:36:13 -0700 (PDT) MIME-Version: 1.0 References: <2006ff8da153bbe5e7f620da9260ee1518bd248f.camel@freebsd.org> In-Reply-To: From: Igor Mozolevsky Date: Sat, 20 Apr 2019 21:35:36 +0100 Message-ID: Subject: Re: bhyve VM stopped to boot after moving virtio disks To: Ian Lepore Cc: Hackers freeBSD Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: B103E70FFB X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of mozolevsky@gmail.com designates 209.85.210.65 as permitted sender) smtp.mailfrom=mozolevsky@gmail.com X-Spamd-Result: default: False [-4.21 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[hybrid-lab.co.uk]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-1.24)[ipnet: 209.85.128.0/17(-3.88), asn: 15169(-2.26), country: US(-0.06)]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[65.210.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; FORGED_SENDER(0.30)[igor@hybrid-lab.co.uk,mozolevsky@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[igor@hybrid-lab.co.uk,mozolevsky@gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Apr 2019 20:36:20 -0000 On Sat, 20 Apr 2019 at 19:29, Ian Lepore wrote: > > On Sat, 2019-04-20 at 18:45 +0100, Igor Mozolevsky wrote: > > On Sat, 20 Apr 2019 at 18:00, Ian Lepore wrote: > > > > > > > dd absolutely will fail to copy the last block of the source if it > > > isn't exactly the blocksize and you didn't specify conv=sync, and > > > it > > > will return a zero status when doing so. It appears you've > > > convinced > > > yourself otherwise, but for anyone else reading this thread, be > > > aware: > > > conv=sync is required to copy the last part of the source if it's > > > smaller than the blocksize. > > > > > > Isn't that contrary to the POSIX Spec? Reading the manual [1], it is > > implied (from STDERR part of the main section) that dd will read and > > write partial blocks, cf. truncated blocks?.. > > > > 1. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/dd.html > > > > > > Damn, why do people trim away the entire useful context of an email > thread when replying? I almost don't want to reply to this because at > this point all the useful info is gone. I only trimmed because you were appearing to be speaking generally and not specifically, so the trimmed part was superfluous. > In any case, in retrospect, what I said was wrong. Using conv=sync is > important when the output is a device that has fixed block sizes where > you cannot write a partial block. When the destination is a file where > short writes work correctly, it will copy the entire source correctly. Thanks for clarifying, I was starting to think I misread the POSIX standard when implementing a local version of dd. -- Igor M.