Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756660AbcLSWdR (ORCPT ); Mon, 19 Dec 2016 17:33:17 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:34912 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756385AbcLSWdO (ORCPT ); Mon, 19 Dec 2016 17:33:14 -0500 MIME-Version: 1.0 Reply-To: kerolasa@gmail.com In-Reply-To: <20161219102402.GA24893@infradead.org> References: <20161218185727.2209-1-kerolasa@iki.fi> <20161219102402.GA24893@infradead.org> From: Sami Kerola Date: Mon, 19 Dec 2016 22:33:13 +0000 X-Google-Sender-Auth: 1V26qQCqcPPsxWrHodltj_3LaXM Message-ID: Subject: Re: [PATCH] vfs: return EOPNOTSUPP when ioctl_fsthaw() is not supported To: Christoph Hellwig Cc: Al Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1331 Lines: 28 On 19 December 2016 at 10:24, Christoph Hellwig wrote: > On Sun, Dec 18, 2016 at 06:57:27PM +0000, Sami Kerola wrote: >> An attempt to freeze a filesystem that does not support such operation is >> reported as EOPNOTSUPP to user. Running unfreeze to the same filesystem >> returns EINVAL. Later is a little misleading, users can mix that message >> with return value from unfreezing when filesystem is not frozen. > > This is going to break gfs2 with it's odd ->that_super method. Thank you for feedback, there's just one small problem with it. I don't quite understand the breakage. Proposed change uses similar logic as ioctl_fsfreeze()[1] and it works fine. If I am not entirely mistaking freeze and thaw hooks where added[2] to avoid issues with gfs2. And looking gfs2 super_operations init[3] does not make me any wiser what might be wrong. Maybe feedback had typo s/that_super/thaw_super/[4]. But even then it is unclear to me how a null could cause breakage. [1] https://github.com/torvalds/linux/blob/master/fs/ioctl.c#L553 [2] https://github.com/torvalds/linux/commit/48b6bca6b7b8309697fc8a101793befe92d249d9 [3] https://github.com/torvalds/linux/blob/master/fs/gfs2/super.c#L1683 [4] https://github.com/torvalds/linux/blob/master/fs/super.c#L1446 -- Sami Kerola http://www.iki.fi/kerolasa/