From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AAD8319992C for ; Wed, 21 Aug 2024 13:08:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724245737; cv=none; b=Wn377nfWUq0zdqJck1rkOpoaGycSssMfhqsDwkvyYv4Thisd700NkowMrTWO/DDd8ApuQxn4jHF4vYOgOwGSDv+lbzcQO8e6Tu6zfRTpWGBIG7yq3F9hVvnMFpkTzH1KO6qy9LrOVNJgxXN6PmVhCn036gPfaIjzbUQ66zDIJXE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724245737; c=relaxed/simple; bh=ybJQR0hiEiFX55/zKRUixsPea5djDrknKPtGT0oPRGw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BtvmMFrxIrJwwwYT6KonqG68I2CE/ue4k8lTyeTZfd8/v4JzJWS/hn+m6dhgJDrbMux5z8B+2rlbZWE3vQ8LMhAFkjHpsRBA5VtGUh3+KafhNGX6RJV/No4kl3fbylkwH5nBogYDwSBIS5H3oRaBrpqGpaNGukNTKNN9r8hLq2I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=iDZpWcAd; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iDZpWcAd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724245734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Ftzy8wmPd1fIZosJOmF+YzPd6W3yB3pGQ4TDRBMo1RA=; b=iDZpWcAdg4xOQjBsdN5dyV2pAg8PjQDGRWATbBpJUTqk9CeHIlSyMpGpCETxd9Snk5FYgf U2FRpdSoj2O2r9nWJkAwLqATdl2YJPa9+6x3LXPuXQGbatYKdYrptZjr913Eyww3x8/QnM cC85OmzAzHpIzXnP5Low4laVJu964Nk= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-655-SIV7iMHCOnWkrfCYlssVvw-1; Wed, 21 Aug 2024 09:08:51 -0400 X-MC-Unique: SIV7iMHCOnWkrfCYlssVvw-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2F5F31954B2A; Wed, 21 Aug 2024 13:08:48 +0000 (UTC) Received: from bfoster (unknown [10.22.33.147]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 54F5C19560AA; Wed, 21 Aug 2024 13:08:45 +0000 (UTC) Date: Wed, 21 Aug 2024 09:09:41 -0400 From: Brian Foster To: Christoph Hellwig Cc: Christian Brauner , Alexander Viro , Chandan Babu R , Jens Axboe , Jan Kara , "Darrick J. Wong" , Theodore Ts'o , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org Subject: Re: [PATCH 6/6] xfs: refactor xfs_file_fallocate Message-ID: References: <20240821063108.650126-1-hch@lst.de> <20240821063108.650126-7-hch@lst.de> <20240821125756.GA21319@lst.de> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240821125756.GA21319@lst.de> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 On Wed, Aug 21, 2024 at 02:57:56PM +0200, Christoph Hellwig wrote: > On Wed, Aug 21, 2024 at 08:44:31AM -0400, Brian Foster wrote: > > > + error = xfs_reflink_unshare(XFS_I(inode), offset, len); > > > + if (error) > > > + return error; > > > + > > > > Doesn't unshare imply alloc? > > Yes, ooks like that got lost and no test noticed it > > > > - if (xfs_file_sync_writes(file)) > > > + if (!error && xfs_file_sync_writes(file)) > > > error = xfs_log_force_inode(ip); > > > > I'd think if you hit -ENOSPC or something after doing a partial alloc to > > a sync inode, you'd still want to flush the changes that were made..? > > Persistence behavior on error is always undefined. And that's also > what the current code does, as it jumps past the log force from all > error exits. > Ok, if this preserves existing behavior then I'm not too worried about it. Thanks. Brian