From: Jan Kara Subject: Re: [PATCH] vfs: Return EINVAL for default SEEK_HOLE, SEEK_DATA implementation Date: Mon, 6 Jan 2014 11:11:51 +0100 Message-ID: <20140106101151.GB3312@quack.suse.cz> References: <1388745326-13226-1-git-send-email-jack@suse.cz> <19710447-69E6-47A2-A679-68552967A750@dilger.ca> <52C8A8FC.4080201@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andreas Dilger , Jan Kara , Al Viro , Theodore Ts'o , "linux-fsdevel@vger.kernel.org" , Jeff Liu To: Josef Bacik Return-path: Received: from cantor2.suse.de ([195.135.220.15]:35667 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752611AbaAFKLx (ORCPT ); Mon, 6 Jan 2014 05:11:53 -0500 Content-Disposition: inline In-Reply-To: <52C8A8FC.4080201@fb.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat 04-01-14 19:36:12, Josef Bacik wrote: > > On 01/03/2014 05:17 PM, Andreas Dilger wrote: > >Shouldn't this be -EOPNOTSUPP, since -EINVAL is for incorrect arguments, which isn't the case here. > > > I think we want to be consistent with previous kernels which would > return -EINVAL if whence wasn't set properly, hopefully breaking as > few userspace stuff as possible. Thanks, Yeah, that's exactly why I chose -EINVAL instead of a bit more logical -EOPNOTSUPP. Honza -- Jan Kara SUSE Labs, CR