From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754615AbdKMTV5 (ORCPT ); Mon, 13 Nov 2017 14:21:57 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:53483 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753634AbdKMTVv (ORCPT ); Mon, 13 Nov 2017 14:21:51 -0500 X-Google-Smtp-Source: AGs4zMaZjrLz4jlyUkzDQGhad1GdT2pN1IO/g4/kGgphB6rN1tjg5a5SqFle6ngIkrFuwC78rTj3bjpGDjFX2B0/vbo= MIME-Version: 1.0 In-Reply-To: References: <20171029225155.qcum5i75awrt5tzm@wfg-t540p.sh.intel.com> <20171030072021.gcgpaolo5m3myuln@wfg-t540p.sh.intel.com> <20171030074429.GC3283@eguan.usersys.redhat.com> <20171031001041.5qjzn5pjertpdc3e@wfg-t540p.sh.intel.com> <20171031065417.GD3283@eguan.usersys.redhat.com> <20171106011306.GB11631@zzz.localdomain> <20171113191322.GA123488@gmail.com> From: Linus Torvalds Date: Mon, 13 Nov 2017 11:21:50 -0800 X-Google-Sender-Auth: NA1SUyoQcebgYEnfLR0OfdN-8NY Message-ID: Subject: Re: [btrfs] WARNING: CPU: 0 PID: 6379 at fs/direct-io.c:293 dio_complete+0x1d4/0x220 To: Jens Axboe Cc: Eric Biggers , Eryu Guan , Fengguang Wu , Lukas Czerner , Jan Kara , "Darrick J. Wong" , Jeff Moyer , Linux Kernel Mailing List , linux-fsdevel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 13, 2017 at 11:16 AM, Jens Axboe wrote: > > I would tend to agree with you, it's annoying to dump a full stack trace > for an expected (even for a rare situation) condition. But it's not the > first one, there's also one in XFS that always triggers for test runs. I > complained about that one in the past. Yeah, we should always consider a WARN_ON() that is triggerable from user space to be a kernel bug. If it's a "cannot happen", then the bug should be fixed. If it's a "can happen, but I want to see the trace", then you just got the trace and you're done, and the WARN_ON() should be removed. It could possibly be replaced with a "pr_warn()" or something, so that it still shows up as a "the user did something dodgy", but honestly, even that is questionable. We do that for things like "we just removed support for this, we want to see if somebody is using it" So in no case is "let's just keep things as is" the right answer. Linus