[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[coreutils] strange behavior of parallel ln across filesystems?
From: |
Peng Yu |
Subject: |
[coreutils] strange behavior of parallel ln across filesystems? |
Date: |
Tue, 6 Jul 2010 23:35:36 -0500 |
I have the following makefile, which calls ln. The error only shows up
(but not 100% percent of the time) if $(OUTDIR) and the current dir is
not in the same file system (say one is on /dev/sde1 and the other is
on /dev/sdb1). It might be something wrong with the filesystem. But
could you please let me know what might cause ln to generate the
following error? Note that I don't see the error if I remove the
'sleep' command in Makefile, which also seems odd to me.
$ cat Makefile
.PHONY: all
OUTDIR:=/storage/tmp/output
#OUTDIR:=here/output
OUTPUT:=$(OUTDIR)/a.txt $(OUTDIR)/b.txt
all: $(OUTPUT)
$(OUTPUT): $(OUTDIR)/%.txt: input/%.txt
mkdir -p $(dir $@); touch $@; sleep .001; ln -fs $(dir $@)
clean:
$(RM) -r $(OUTDIR)
$ make -j2
mkdir -p /storage/tmp/output/; touch /storage/tmp/output/a.txt; sleep
.001; ln -fs /storage/tmp/output/
mkdir -p /storage/tmp/output/; touch /storage/tmp/output/b.txt; sleep
.001; ln -fs /storage/tmp/output/
ln: cannot remove `./output': No such file or directory
make: *** [/storage/tmp/output/b.txt] Error 1
make: *** Waiting for unfinished jobs....
--
Regards,
Peng
- [coreutils] strange behavior of parallel ln across filesystems?,
Peng Yu <=