From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9956AC43381 for ; Mon, 11 Mar 2019 02:24:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6CE5820652 for ; Mon, 11 Mar 2019 02:24:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726998AbfCKCY4 (ORCPT ); Sun, 10 Mar 2019 22:24:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42760 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726687AbfCKCY4 (ORCPT ); Sun, 10 Mar 2019 22:24:56 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1BFE4E6A78; Mon, 11 Mar 2019 02:24:56 +0000 (UTC) Received: from ming.t460p (ovpn-8-25.pek2.redhat.com [10.72.8.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0347D1974B; Mon, 11 Mar 2019 02:24:47 +0000 (UTC) Date: Mon, 11 Mar 2019 10:24:42 +0800 From: Ming Lei To: linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, Christoph Hellwig , Jens Axboe , Chaitanya Kulkarni Subject: NVMe: Regression: write zeros corrupts ext4 file system Message-ID: <20190311022441.GA16849@ming.t460p> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 11 Mar 2019 02:24:56 +0000 (UTC) Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Hi, It is observed that ext4 is corrupted easily by running some workloads on QEMU NVMe, such as: 1) mkfs.ext4 /dev/nvme0n1 2) mount /dev/nvme0n1 /mnt 3) cd /mnt; git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 4) then the following error message may show up: [ 1642.271816] EXT4-fs error (device nvme0n1): ext4_mb_generate_buddy:747: group 0, block bitmap and bg descriptor inconsistent: 32768 vs 23513 free clusters Or fsck.ext4 will complain after running 'umount /mnt' The issue disappears by reverting 6e02318eaea53eaafe6 ("nvme: add support for the Write Zeroes command"). QEMU version: QEMU emulator version 2.10.2(qemu-2.10.2-1.fc27) Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers Thanks, Ming