tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ffs_balloc_ufs1 error handling



Hi all,
from my understand of the code and the history of ffs_balloc_ufs1,
the first if after fail: is meant to flush the vnode content to disk to
break up dependencies. From FreeBSD's history, this is the cheap
approach to handle erroring out for softdep filesystems when they become
full.

Does anyone object the attached patch to conditionalize this logic on
softdep?

Joerg
Index: ffs_balloc.c
===================================================================
RCS file: /home/joerg/repo/netbsd/src/sys/ufs/ffs/ffs_balloc.c,v
retrieving revision 1.51
diff -u -p -r1.51 ffs_balloc.c
--- ffs_balloc.c        31 Jul 2008 05:38:06 -0000      1.51
+++ ffs_balloc.c        7 Dec 2008 19:59:55 -0000
@@ -468,7 +468,7 @@ fail:
         * have to deallocate any indirect blocks that we have allocated.
         */
 
-       if (unwindidx >= 0) {
+       if (DOINGSOFTDEP(vp) && unwindidx >= 0) {
 
                /*
                 * First write out any buffers we've created to resolve their


Home | Main Index | Thread Index | Old Index