linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Inode ENOSPC due to recently_deleted()
@ 2020-03-05 17:14 Jan Kara
  2020-03-05 19:37 ` Theodore Y. Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kara @ 2020-03-05 17:14 UTC (permalink / raw)
  To: Ted Tso; +Cc: linux-ext4

Hello!

Recently, I've got a bug report about ext4 driver regressing compared to
the old ext2 driver. The problem is that the filesystem is small and they
fill the fs (use all inodes), then delete some files, and then want to use
the inodes for other files but recently_deleted() logic makes the freed
inodes unusable and thus inode allocation fails with ENOSPC.

AFAIU the logic implemented by recently_deleted() is more of a preference
than a hard rule and we should rather reuse recently deleted inodes than
return ENOSPC. Am I right?

Also I'd note that the detection whether the inode was written out in
recently_deleted() is very inaccurate - one of the problems is that if
several inodes in the same inode table block are deleted, then after
writing out that block we'll be able to reuse only one of these inodes
because by doing that, we certainly cache and dirty the inode block and
thus the recently_deleted() logic for other deleted inodes will start to
apply. But I think we can just live with that if we stop making
recently_deleted() a hard rule...

What do people think?

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Inode ENOSPC due to recently_deleted()
  2020-03-05 17:14 Inode ENOSPC due to recently_deleted() Jan Kara
@ 2020-03-05 19:37 ` Theodore Y. Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Y. Ts'o @ 2020-03-05 19:37 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-ext4

On Thu, Mar 05, 2020 at 06:14:31PM +0100, Jan Kara wrote:
> Hello!
> 
> Recently, I've got a bug report about ext4 driver regressing compared to
> the old ext2 driver. The problem is that the filesystem is small and they
> fill the fs (use all inodes), then delete some files, and then want to use
> the inodes for other files but recently_deleted() logic makes the freed
> inodes unusable and thus inode allocation fails with ENOSPC.
> 
> AFAIU the logic implemented by recently_deleted() is more of a preference
> than a hard rule and we should rather reuse recently deleted inodes than
> return ENOSPC. Am I right?
> 
> Also I'd note that the detection whether the inode was written out in
> recently_deleted() is very inaccurate - one of the problems is that if
> several inodes in the same inode table block are deleted, then after
> writing out that block we'll be able to reuse only one of these inodes
> because by doing that, we certainly cache and dirty the inode block and
> thus the recently_deleted() logic for other deleted inodes will start to
> apply. But I think we can just live with that if we stop making
> recently_deleted() a hard rule...

Yes, if we can't find any another inodes, rerying with
recently_deleted logic skipped makes sense.

						- Ted

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-05 19:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-05 17:14 Inode ENOSPC due to recently_deleted() Jan Kara
2020-03-05 19:37 ` Theodore Y. Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).