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

 



On Fri, Aug 29, 2014 at 09:39:59PM +0200, Toralf Förster wrote:
 > If a (small) file system is fullfilled, then there's an endless loop in opening logiles, tested with 4 childs in a KVM within a 97 MB big BTRFS file system created in a file in a ramdisk, commands are :
 > 
 > 
 > $> mkdir /mnt/ramdisk/btrfs; truncate -s 97M /mnt/ramdisk/btrfs.fs; /sbin/mkfs.btrfs /mnt/ramdisk/btrfs.fs; sudo su -c "mount -o loop,compress=lzo /mnt/ramdisk/btrfs.fs /mnt/ramdisk/btrfs; chmod 777 /mnt/ramdisk/btrfs"
 > 
 > $> D=/mnt/ramdisk/btrfs; while [[ : ]]; do cd ~; sudo rm -rf $D/t3; mkdir $D/t3 || break; cd $D/t3; mkdir -p v1/v2; for i in $(seq 0 99); do touch v1/v2/f$i; mkdir v1/v2/d$i; done; trinity -C 4 -N 100000 -V $D/t3/v1/v2; echo; echo " done"; echo; sleep 4; done

short on time right now, but try this..

	Dave

diff --git a/include/exit.h b/include/exit.h
index 948ecea02112..ebbaf98cfaac 100644
--- a/include/exit.h
+++ b/include/exit.h
@@ -19,8 +19,9 @@ enum exit_reasons {
 	EXIT_FD_INIT_FAILURE = 13,
 	EXIT_FORK_FAILURE = 14,
 	EXIT_LOCKING_CATASTROPHE = 15,
+	EXIT_LOGFILE_OPEN_ERROR = 16,
 
-	NUM_EXIT_REASONS = 16
+	NUM_EXIT_REASONS = 17
 };
 
 const char * decode_exit(void);
diff --git a/log.c b/log.c
index 22b72db86f3c..0ccd1ba45cc9 100644
--- a/log.c
+++ b/log.c
@@ -60,8 +60,10 @@ void open_child_logfile(struct childdata *child)
 	sprintf(logfilename, "trinity-child%u.log", child->num);
 
 	child->logfile = open_logfile(logfilename);
-	if (!child->logfile)
+	if (!child->logfile) {
+		shm->exit_reason = EXIT_LOGFILE_OPEN_ERROR;
 		exit(EXIT_FAILURE);
+	}
 
 	free(logfilename);
 
diff --git a/main.c b/main.c
index 5541de09ae7e..ed3d02c0d4e5 100644
--- a/main.c
+++ b/main.c
@@ -295,6 +295,7 @@ static const char *reasons[NUM_EXIT_REASONS] = {
 	"Something happened during fd init.",
 	"fork() failure",
 	"some kind of locking catastrophe",
+	"error while opening logfiles",
 };
 
 const char * decode_exit(void)
--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux