Tech
[Linux] 发现了一个 btrfs 的 bug,有没有 v 友一起来看下?
我让 Codex 帮我写了一个可以稳定触发这个 bug 的程序:
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdatomic.h>
#include <sys/mman.h>
#include <unistd.h>
#define READ_SIZE 4096UL
#define TEST_FILE_SIZE (1UL * 1024 * 1024)
#define MAX_TRIES 100UL
/*
* Reproduce the Btrfs direct-IO checksum false failure:
* one thread overwrites the O_DIRECT read buffer wh...
Read the full discussion on V2EX
This article was aggregated from V2EX. Click to join the conversation.
View on V2EX