linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adam Borowski <kilobyte@angband.pl>
To: Goldwyn Rodrigues <rgoldwyn@suse.de>,
	linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	marcin.slusarz@intel.com
Subject: Re: [PATCH] btrfs: allow MAP_SYNC mmap
Date: Thu, 28 Mar 2019 11:42:28 +0100	[thread overview]
Message-ID: <20190328104228.GA22302@angband.pl> (raw)
In-Reply-To: <20190328102418.5466-1-kilobyte@angband.pl>

[kdave: like the rest of btrfs+DAX patchset, this is WIP of course]

> diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
> index 196c8f37ff9d..8efdb040bc1d 100644
> --- a/fs/btrfs/file.c
> +++ b/fs/btrfs/file.c
> @@ -16,6 +16,7 @@
> +#include <linux/mman.h>

> +	.mmap_supported_flags = MAP_SYNC,

With this, the userspace at least thinks that DAX works.  Whether it's
actually crash-safe, will require a lot of review that's outside of my
areas of knowledge.

Most of the PMDK's test suite passes, but at least pmemspoil test fails.
There's also (not sure if in pmemspoil or earlier):

[  652.053976] RIP: 0010:btrfs_free_reserved_data_space_noquota+0xe6/0xf0
[  652.060683] Code: b8 00 48 8b 45 00 48 85 c0 75 d7 41 c6 45 00 00 5b 5d 41 5c 41 5d 41 5e 41 5f c3 48 89 c1 48 f7 d9 48 39 ca 0f 83 6a ff ff ff <0f> 0b 31 c0 e9 64 ff ff ff 90 41 55 49 89 fd 41 54 49 89 f4 55 53
[  652.079767] RSP: 0000:ffff99450807fc38 EFLAGS: 00010287
[  652.085078] RAX: fffffffffffff000 RBX: 0000000000300000 RCX: 0000000000001000
[  652.092330] RDX: 0000000000000000 RSI: 0000000000300000 RDI: ffff89965030a000
[  652.099583] RBP: 0000000000300000 R08: ffff99450807fc28 R09: ffffffffae6bc01a
[  652.106836] R10: ffffc76c9f5f8600 R11: 0000000000000011 R12: 0000000000300fff
[  652.114089] R13: ffff89965030a000 R14: ffff89964a82d000 R15: 0000000000000002
[  652.121342] FS:  00007fee0adcc800(0000) GS:ffff899655bc0000(0000) knlGS:0000000000000000
[  652.129566] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  652.135405] CR2: 00007fee0a700000 CR3: 00000007742d6006 CR4: 00000000003606e0
[  652.142657] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  652.149822] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  652.157149] Call Trace:
[  652.159550]  btrfs_free_reserved_data_space+0x46/0x60
[  652.164755]  btrfs_iomap_end+0xf4/0x150
[  652.168654]  dax_iomap_pte_fault.isra.41+0x201/0x8f0
[  652.173712]  btrfs_dax_fault+0x3c/0xa0
[  652.177523]  __do_fault+0x2f/0x90
[  652.180891]  __handle_mm_fault+0x9fa/0xed0
[  652.185056]  __do_page_fault+0x242/0x4c0
[  652.188955]  ? page_fault+0x8/0x30
[  652.192484]  page_fault+0x1e/0x30
[  652.195854] RIP: 0033:0x7fee0b340efc
[  652.199400] Code: 9d 48 81 fa 80 00 00 00 77 19 c5 fe 7f 07 c5 fe 7f 47 20 c5 fe 7f 44 17 e0 c5 fe 7f 44 17 c0 c5 f8 77 c3 48 8d 8f 80 00 00 00 <c5> fe 7f 07 48 83 e1 80 c5 fe 7f 44 17 e0 c5 fe 7f 47 20 c5 fe 7f
[  652.218563] RSP: 002b:00007ffcd02d58e8 EFLAGS: 00010202
[  652.223786] RAX: 00007fee0a700000 RBX: 00007fee0a6fffc0 RCX: 00007fee0a700080
[  652.231026] RDX: 0000000000000800 RSI: 0000000000000000 RDI: 00007fee0a700000
[  652.238353] RBP: 00007fee0a401b38 R08: 000000000000000f R09: 0000000000000001
[  652.245606] R10: 000000000000000d R11: 00007fee0b360bf0 R12: 0000000000000800
[  652.252865] R13: 00007fee0b4a6eec R14: 00007fee0a700000 R15: 0000000000000180
[  652.260119] ---[ end trace b6545baf6cf711c6 ]---


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Did ya know that typing "test -j8" instead of "ctest -j8"
⢿⡄⠘⠷⠚⠋⠀ will make your testsuite pass much faster, and fix bugs?
⠈⠳⣄⠀⠀⠀⠀

  reply	other threads:[~2019-03-28 10:42 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190326190301.32365-1-rgoldwyn@suse.de>
2019-03-26 19:02 ` [PATCH 01/15] btrfs: create a mount option for dax Goldwyn Rodrigues
2019-03-26 19:10   ` Matthew Wilcox
2019-03-27 11:00     ` Goldwyn Rodrigues
2019-03-27 12:00       ` Matthew Wilcox
2019-03-27 12:26         ` Goldwyn Rodrigues
2019-03-27 23:31         ` Goldwyn Rodrigues
2019-03-27 17:38     ` Adam Borowski
2019-03-28 14:49   ` David Sterba
2019-03-28 17:28   ` David Sterba
2019-03-28 17:57     ` Darrick J. Wong
2019-04-01 20:43     ` Goldwyn Rodrigues
2019-03-26 19:02 ` [PATCH 02/15] btrfs: Carve out btrfs_get_extent_map_write() out of btrfs_get_blocks_write() Goldwyn Rodrigues
2019-03-26 19:02 ` [PATCH 03/15] btrfs: basic dax read Goldwyn Rodrigues
2019-03-26 19:02 ` [PATCH 04/15] dax: Introduce IOMAP_F_COW for copy-on-write Goldwyn Rodrigues
2019-03-27 17:54   ` Darrick J. Wong
2019-03-27 18:58     ` Goldwyn Rodrigues
2019-03-28 14:45       ` Darrick J. Wong
2019-04-01  4:38   ` Dave Chinner
2019-04-01 21:41     ` Goldwyn Rodrigues
2019-04-01 23:06       ` Dave Chinner
2019-04-03  1:56         ` Goldwyn Rodrigues
2019-04-03  3:20           ` Dave Chinner
2019-04-07  7:26     ` Christoph Hellwig
2019-03-26 19:02 ` [PATCH 05/15] btrfs: return whether extent is nocow or not Goldwyn Rodrigues
2019-03-31 18:42   ` Nikolay Borisov
2019-03-26 19:02 ` [PATCH 06/15] btrfs: Rename __endio_write_update_ordered() to btrfs_update_ordered_extent() Goldwyn Rodrigues
2019-03-26 19:02 ` [PATCH 07/15] btrfs: add dax write support Goldwyn Rodrigues
2019-03-28 14:53   ` Darrick J. Wong
2019-04-01 20:39     ` Goldwyn Rodrigues
2019-03-26 19:02 ` [PATCH 08/15] dax: add dax_iomap_cow to copy a mmap page before writing Goldwyn Rodrigues
2019-03-28 15:41   ` Darrick J. Wong
2019-03-26 19:02 ` [PATCH 09/15] btrfs: add dax mmap support Goldwyn Rodrigues
2019-03-28 15:45   ` Darrick J. Wong
2019-03-26 19:02 ` [PATCH 10/15] btrfs: Add dax specific address_space_operations Goldwyn Rodrigues
2019-03-26 19:02 ` [PATCH 11/15] fs: dedup file range to use a compare function Goldwyn Rodrigues
2019-03-28 17:04   ` Darrick J. Wong
2019-04-01 20:36     ` Goldwyn Rodrigues
2019-03-26 19:02 ` [PATCH 12/15] btrfs: trace functions for btrfs_iomap_begin/end Goldwyn Rodrigues
2019-03-26 19:02 ` [PATCH 13/15] btrfs: handle dax page zeroing Goldwyn Rodrigues
2019-03-26 19:03 ` [PATCH 14/15] btrfs: Disable dax-based defrag and send Goldwyn Rodrigues
2019-03-26 19:03 ` [PATCH 15/15] btrfs: Writeprotect mmap pages on snapshot Goldwyn Rodrigues
2019-03-28 15:48   ` Darrick J. Wong
2019-03-26 19:09 ` [PATCH v2 00/15] btrfs dax support Goldwyn Rodrigues
2019-03-27 20:14   ` Adam Borowski
2019-03-27 23:26     ` Goldwyn Rodrigues
2019-03-28 10:24       ` [PATCH] btrfs: allow MAP_SYNC mmap Adam Borowski
2019-03-28 10:42         ` Adam Borowski [this message]
2019-04-01 20:08         ` Goldwyn Rodrigues

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190328104228.GA22302@angband.pl \
    --to=kilobyte@angband.pl \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=marcin.slusarz@intel.com \
    --cc=rgoldwyn@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).