All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind@yandex.ru>
To: Jan Kara <jack@suse.cz>
Cc: Al Viro <viro@ftp.linux.org.uk>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: is the inode an orphan?
Date: Mon, 19 Nov 2007 17:02:42 +0200	[thread overview]
Message-ID: <4741A592.3080908@yandex.ru> (raw)
In-Reply-To: <20071030141004.GA27039@atrey.karlin.mff.cuni.cz>

Hi,

Jan Kara wrote:
>> In our FS when we're in ->unlink() and i_nlink becomes 0, we have to record 
>> this inode in the table of orphans, and remove it from there in 
>> ->delete_inode(). This is needed to be able to dispose of orphans in case 
>> of an unclean reboot on the next mount. AFAIK, ext3 has something similar. 
>> I just figured that this could be optimized - in most cases 
>> ->delete_inode() is called right after ->unlink(), and I wanted to avoid 
>> putting the inode to the orphan table in those cases.
>   Yes, ext3 has something similar. But actually ext3 would have to insert
> inode in the orphan list anyway - in delete_inode we do truncate and
> for it we also insert the inode into the orphan list because truncate
> can be too large to fit into a single transaction.

Ok, thanks for this point.

>   Hmm, I'm just not sure whether unlink cannot somehow race with open
> (at least I don't see any lock that would prevent open while unlink is
> in progress)...

And this.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

      reply	other threads:[~2007-11-19 15:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-18 17:49 is the inode an orphan? Artem Bityutskiy
2007-10-18 18:01 ` Al Viro
2007-10-19  7:07   ` Artem Bityutskiy
2007-10-30 14:10     ` Jan Kara
2007-11-19 15:02       ` Artem Bityutskiy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4741A592.3080908@yandex.ru \
    --to=dedekind@yandex.ru \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.