From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Tue, 19 Jun 2018 08:36:24 +0200 Subject: [Cluster-devel] [PATCH v9 2/5] gfs2: iomap buffered write support In-Reply-To: <20180615121922.13237-3-agruenba@redhat.com> References: <20180615121922.13237-1-agruenba@redhat.com> <20180615121922.13237-3-agruenba@redhat.com> Message-ID: <20180619063624.GC24513@lst.de> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit > +/* > + * Copyright (C) 2017 Red Hat, Inc. All rights reserved. > + * > + * This copyrighted material is made available to anyone wishing to use, > + * modify, copy, or redistribute it subject to the terms and conditions > + * of the GNU General Public License version 2. > + */ Replace with an SPDX tag, please. > +static int gfs2_iomap_begin_write(struct inode *inode, loff_t pos, loff_t length, overly long line. > + gfs2_write_calc_reserv(ip, iomap->length, &data_blocks, &ind_blocks); plus a few more down the function. > + if (iocb->ki_flags & IOCB_DIRECT) > + return generic_file_write_iter(iocb, from); This looks odd, as generic_file_write_iter duplicate the code below to a large extent, but it's probably ok. > @@ -754,7 +786,7 @@ static int fallocate_chunk(struct inode *inode, loff_t offset, loff_t len, > if (error) > goto out; > offset = iomap.offset + iomap.length; > - if (iomap.type != IOMAP_HOLE) > + if (!(iomap.flags & IOMAP_F_NEW)) > continue; shouldn't this be a separate patch? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de ([213.95.11.211]:39281 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755856AbeFSG10 (ORCPT ); Tue, 19 Jun 2018 02:27:26 -0400 Date: Tue, 19 Jun 2018 08:36:24 +0200 From: Christoph Hellwig To: Andreas Gruenbacher Cc: cluster-devel@redhat.com, Christoph Hellwig , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v9 2/5] gfs2: iomap buffered write support Message-ID: <20180619063624.GC24513@lst.de> References: <20180615121922.13237-1-agruenba@redhat.com> <20180615121922.13237-3-agruenba@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180615121922.13237-3-agruenba@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > +/* > + * Copyright (C) 2017 Red Hat, Inc. All rights reserved. > + * > + * This copyrighted material is made available to anyone wishing to use, > + * modify, copy, or redistribute it subject to the terms and conditions > + * of the GNU General Public License version 2. > + */ Replace with an SPDX tag, please. > +static int gfs2_iomap_begin_write(struct inode *inode, loff_t pos, loff_t length, overly long line. > + gfs2_write_calc_reserv(ip, iomap->length, &data_blocks, &ind_blocks); plus a few more down the function. > + if (iocb->ki_flags & IOCB_DIRECT) > + return generic_file_write_iter(iocb, from); This looks odd, as generic_file_write_iter duplicate the code below to a large extent, but it's probably ok. > @@ -754,7 +786,7 @@ static int fallocate_chunk(struct inode *inode, loff_t offset, loff_t len, > if (error) > goto out; > offset = iomap.offset + iomap.length; > - if (iomap.type != IOMAP_HOLE) > + if (!(iomap.flags & IOMAP_F_NEW)) > continue; shouldn't this be a separate patch?