Skip to content

Commit

Permalink
fix generate storage bug
Browse files Browse the repository at this point in the history
fix generate storage racy bug

remove seek option in dd
  • Loading branch information
erichchan999 committed Feb 9, 2024
1 parent 8aaa9f6 commit dddea71
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/virtio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -356,16 +356,16 @@ $(BUILD_DIR)/postmark: $(LINUX_DIR)/postmark.c Makefile
$(BUILD_DIR)/storage_0: Makefile
dd if=/dev/zero of=$@ bs=1K count=1000 && \
echo -e "g\nn\n1\n50\n\nw" | fdisk $@ && \
dd if=/dev/zero of=$(BUILD_DIR)/ext4fs bs=1K count=1000 seek=1000 && \
mkfs.ext4 $(BUILD_DIR)/ext4fs 290 && \
dd if=$(BUILD_DIR)/ext4fs of=$@ bs=512 seek=50 conv=notrunc
dd if=/dev/zero of=$(BUILD_DIR)/ext4fs bs=1K count=1000 && \
mkfs.ext4 $(BUILD_DIR)/ext4fs_0 290 && \
dd if=$(BUILD_DIR)/ext4fs_0 of=$@ bs=512 seek=50 conv=notrunc

$(BUILD_DIR)/storage_1: Makefile
dd if=/dev/zero of=$@ bs=1K count=1000 && \
echo -e "g\nn\n1\n50\n\nw" | fdisk $@ && \
dd if=/dev/zero of=$(BUILD_DIR)/ext4fs bs=1K count=1000 seek=1000 && \
mkfs.ext4 $(BUILD_DIR)/ext4fs 290 && \
dd if=$(BUILD_DIR)/ext4fs of=$@ bs=512 seek=50 conv=notrunc
dd if=/dev/zero of=$(BUILD_DIR)/ext4fs bs=1K count=1000 && \
mkfs.ext4 $(BUILD_DIR)/ext4fs_1 290 && \
dd if=$(BUILD_DIR)/ext4fs_1 of=$@ bs=512 seek=50 conv=notrunc

$(BUILD_DIR)/blk_client_init: $(LINUX_DIR)/blk_client_init Makefile
cp $< $@
Expand Down

0 comments on commit dddea71

Please sign in to comment.