From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?B?SsO2cm4=?= Engel Subject: Re: [PATCH] LogFS take three Date: Wed, 16 May 2007 04:11:39 +0200 Message-ID: <20070516021139.GA3175@lazybastard.org> References: <20070515151919.GA32510@lazybastard.org> <20070515133759.9ee434a2.akpm@linux-foundation.org> <20070516000630.GD1220@lazybastard.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Albert Cahalan , Thomas Gleixner , Jan Engelhardt , Evgeniy Polyakov , Pekka Enberg , Greg KH , Ingo Oeser To: Andrew Morton Return-path: Content-Disposition: inline In-Reply-To: <20070516000630.GD1220@lazybastard.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, 16 May 2007 02:06:31 +0200, J=C3=B6rn Engel wrote: > > > > + > > > + if (dest) { > > > + /* symlink */ > > > + ret =3D logfs_inode_write(inode, dest, destlen, 0); > > > + } else { > > > + /* creat/mkdir/mknod */ > > > + ret =3D __logfs_write_inode(inode); > > > + } > > > + super->s_victim_ino =3D 0; > > > + if (ret) { > > > + if (!dest) > > > + li->li_flags |=3D LOGFS_IF_STILLBORN; > > > + /* FIXME: truncate symlink */ > > > + inode->i_nlink--; > > > + iput(inode); > > > + goto out; > > > + } > > > + > > > + if (inode->i_mode & S_IFDIR) > > > + dir->i_nlink++; > >=20 > > You have helper functions for i_nlink++, which remember to do > > mark_inode_dirty()? >=20 > I do. Looks like I should use them here and in at least one other > place. Will recheck them all. Actually, this code was correct. New inodes get written immediatly to ensure catching -ENOSPC at a place where errors can get returned. Afte= r leaving this function, the inode is not dirty. Either it has been written or it is marked LOGFS_IF_STILLBORN never will be. Your intuition was still good. Link() did need the change you indicated. J=C3=B6rn --=20 Joern's library part 14: http://www.sandpile.org/