From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f47.google.com ([74.125.83.47]:52316 "EHLO mail-pg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751271AbdIRDKf (ORCPT ); Sun, 17 Sep 2017 23:10:35 -0400 Received: by mail-pg0-f47.google.com with SMTP id i195so4278283pgd.9 for ; Sun, 17 Sep 2017 20:10:35 -0700 (PDT) Date: Mon, 18 Sep 2017 12:10:40 +0900 Message-ID: <87377kaehb.wl-satoru.takeuchi@gmail.com> From: Satoru Takeuchi To: Ruoxin Jiang Cc: linux-btrfs@vger.kernel.org Subject: Re: Btrfs Issues In-Reply-To: References: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-btrfs-owner@vger.kernel.org List-ID: At Wed, 13 Sep 2017 11:53:35 -0400, Ruoxin Jiang wrote: > > [1 ] > Hello, > > We are researchers from Columbia University, New York. As part of our > current research we have found some semantic discrepancies between > btrfs and other popular filesystems. > > We have attached two cases. The first one involves an invalid O_DIRECT > write() that fails back to buffered write instead of failing with > error EINVAL. In directory 2, we discovered that btrfs calculates > write_bytes in __btrfs_buffered_write differently from that in > generic_perform_writes in fs/mmap.c. This can cause inconsistent > behavior between btrfs and other filesystems when program invokes the > same writev/write() syscall. > > In each directory, you will find a Readme.md describing the issue and > pointing to the code that may cause the problem. For your convenience, > we also included test programs (min.cpp) and instructions in Readme to > help reproduce the issues. > > We would appreciate very much if you could confirm the two cases at > your conveniences. I took a look at your test programs, btrfs_issues/{1,2}/min.cpp. It looks very hard to read since you call syscalls in odd ways and all flags are hardcoded as literal hexadecimal numbers. Could rewrite these program to improve readability? In addition, I have two questions about btrfs_issues/1/min.cpp. 1. Why you set 'filename' as the 1st argument of mmap()? 2. What's the purpose of mmap() call? I guess mmap() is not related to issue 1. Thanks, Satoru > > Thanks, > Amy > [2 btrfs_issues.tar.gz ]