From patchwork Wed Apr 15 13:29:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 6220751 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 76C08BF4A6 for ; Wed, 15 Apr 2015 13:31:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 99531202E5 for ; Wed, 15 Apr 2015 13:31:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 996B5202FF for ; Wed, 15 Apr 2015 13:31:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753554AbbDONbc (ORCPT ); Wed, 15 Apr 2015 09:31:32 -0400 Received: from e28smtp09.in.ibm.com ([122.248.162.9]:33166 "EHLO e28smtp09.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754670AbbDONb1 (ORCPT ); Wed, 15 Apr 2015 09:31:27 -0400 Received: from /spool/local by e28smtp09.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 15 Apr 2015 19:01:24 +0530 Received: from d28dlp03.in.ibm.com (9.184.220.128) by e28smtp09.in.ibm.com (192.168.1.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 15 Apr 2015 19:01:21 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 74A201258059; Wed, 15 Apr 2015 19:03:12 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay03.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t3FDVJ1N53477560; Wed, 15 Apr 2015 19:01:19 +0530 Received: from d28av01.in.ibm.com (localhost [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t3FDUH9Z029481; Wed, 15 Apr 2015 19:00:17 +0530 Received: from localhost.in.ibm.com ([9.77.121.249]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t3FDUARb028526; Wed, 15 Apr 2015 19:00:13 +0530 From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , linux-fsdevel@vger.kernel.org, chandan@mykolab.com Subject: [RFC PATCH] fiemap-tester.c: Do not error out when FIEMAP_EXTENT_NOT_ALIGNED is set and extent is aligned. Date: Wed, 15 Apr 2015 18:59:53 +0530 Message-Id: <1429104593-24136-1-git-send-email-chandan@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15041513-0033-0000-0000-000005382BF2 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From Linux kernel's Documentation/filesystems/fiemap.txt, * FIEMAP_EXTENT_NOT_ALIGNED Extent offsets and length are not guaranteed to be block aligned. So this means that FIEMAP_EXTENT_NOT_ALIGNED is just a hint that indicates that the extent range could possibly be out of alignment w.r.t to the filesystem's blocksize. It should still be possible for fiemap ioctl to return extents with FIEMAP_EXTENT_NOT_ALIGNED flag set (e.g. Inline extents) but which have blocksize aligned ranges. Signed-off-by: Chandan Rajendra --- src/fiemap-tester.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/fiemap-tester.c b/src/fiemap-tester.c index 8e633ab..74dea17 100644 --- a/src/fiemap-tester.c +++ b/src/fiemap-tester.c @@ -195,17 +195,6 @@ check_flags(struct fiemap *fiemap, int blocksize) return -1; } - if (extent->fe_flags & FIEMAP_EXTENT_NOT_ALIGNED && - aligned_offset == extent->fe_physical && - aligned_length == extent->fe_length) { - printf("ERROR: FIEMAP_EXTENT_NOT_ALIGNED is set but " - "offset and length is blocksize aligned: " - "%llu\n", - (unsigned long long) - (extent->fe_logical / blocksize)); - return -1; - } - if (extent->fe_flags & FIEMAP_EXTENT_LAST && c + 1 < fiemap->fm_mapped_extents) { printf("ERROR: FIEMAP_EXTENT_LAST is set but there are"