[KPhotoAlbum] thumbnail build doesn't notice disk full
Robert Krawitz
rlk at alum.mit.edu
Wed Nov 7 22:24:15 GMT 2007
Date: Wed, 07 Nov 2007 22:43:47 +0100
From: =?ISO-8859-1?Q?Jan_Kundr=E1t?= <jkt at gentoo.org>
Mark Eichin wrote:
> kphotoalbum 3.0.2-1build1 (Ubuntu Gutsy), ran out of disk space while
> doing Maintenance->Build Thumbnails. It didn't stop or complain at
> all - just dumped lines and lines of:
There's a variety of reasons why a write syscall could fail. We could
certainly display a user-friendly message in such a case, but is this
really worth the extra effort? If you run out of disk space, you'll get
bigger problems with your system than missing thumbnails. Free space
should be monitored by other means than by a warning from first
application that happens to exceed quota/fill up disk, IMHO.
As a general principle, everything that writes data really does need
to check the return value from both the write and the close (the
write, particularly if you're using buffered I/O, may not be
synchronous), period. There are no shortcuts. You can't rely on
anything else monitoring free space, and there are a lot of other
reasons a write could fail (network problems, for example, if you're
using a networked filesystem).
Creating a bunch of zero length thumbnails is embarrassing. If
writing the index.xml file has the same problem, the results could be
much more serious.
--
Robert Krawitz <rlk at alum.mit.edu>
Tall Clubs International -- http://www.tall.org/ or 1-888-IM-TALL-2
Member of the League for Programming Freedom -- mail lpf at uunet.uu.net
Project lead for Gutenprint -- http://gimp-print.sourceforge.net
"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
More information about the Kphotoalbum
mailing list