From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:40599 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753208AbbJMVxL (ORCPT ); Tue, 13 Oct 2015 17:53:11 -0400 Subject: Patch "blockdev: don't set S_DAX for misaligned partitions" has been added to the 4.1-stable tree To: jmoyer@redhat.com, boaz@plexistor.com, dan.j.williams@intel.com, gregkh@linuxfoundation.org Cc: , From: Date: Tue, 13 Oct 2015 14:53:07 -0700 Message-ID: <1444773187923@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled blockdev: don't set S_DAX for misaligned partitions to the 4.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: blockdev-don-t-set-s_dax-for-misaligned-partitions.patch and it can be found in the queue-4.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From f0b2e563bc419df7c1b3d2f494574c25125f6aed Mon Sep 17 00:00:00 2001 From: Jeff Moyer Date: Fri, 14 Aug 2015 16:15:32 -0400 Subject: blockdev: don't set S_DAX for misaligned partitions From: Jeff Moyer commit f0b2e563bc419df7c1b3d2f494574c25125f6aed upstream. The dax code doesn't currently support misaligned partitions, so disable O_DIRECT via dax until such time as that support materializes. Suggested-by: Boaz Harrosh Signed-off-by: Jeff Moyer Signed-off-by: Dan Williams Signed-off-by: Greg Kroah-Hartman --- fs/block_dev.c | 7 +++++++ 1 file changed, 7 insertions(+) --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -1234,6 +1234,13 @@ static int __blkdev_get(struct block_dev goto out_clear; } bd_set_size(bdev, (loff_t)bdev->bd_part->nr_sects << 9); + /* + * If the partition is not aligned on a page + * boundary, we can't do dax I/O to it. + */ + if ((bdev->bd_part->start_sect % (PAGE_SIZE / 512)) || + (bdev->bd_part->nr_sects % (PAGE_SIZE / 512))) + bdev->bd_inode->i_flags &= ~S_DAX; } } else { if (bdev->bd_contains == bdev) { Patches currently in stable-queue which might be from jmoyer@redhat.com are queue-4.1/blockdev-don-t-set-s_dax-for-misaligned-partitions.patch