From patchwork Fri Aug 21 07:43:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gang He X-Patchwork-Id: 7049521 Return-Path: X-Original-To: patchwork-ocfs2-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C83E69F373 for ; Fri, 21 Aug 2015 07:46:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E825820606 for ; Fri, 21 Aug 2015 07:46:19 +0000 (UTC) Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D90B72058E for ; Fri, 21 Aug 2015 07:46:18 +0000 (UTC) Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t7L7ijuT031397 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 21 Aug 2015 07:44:45 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t7L7iilA006722 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 Aug 2015 07:44:44 GMT Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1ZSh0G-0005Sb-Bc; Fri, 21 Aug 2015 00:44:44 -0700 Received: from userv0021.oracle.com ([156.151.31.71]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1ZSgzQ-0005Qb-Fr for ocfs2-devel@oss.oracle.com; Fri, 21 Aug 2015 00:43:52 -0700 Received: from aserp1020.oracle.com (aserp1020.oracle.com [141.146.126.67]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t7L7hpv0018074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Aug 2015 07:43:52 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by aserp1020.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t7L7ho4B030042 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 21 Aug 2015 07:43:51 GMT Received: from pps.filterd (userp2030.oracle.com [127.0.0.1]) by userp2030.oracle.com (8.15.0.59/8.15.0.59) with SMTP id t7L7h6Nr044726 for ; Fri, 21 Aug 2015 07:43:50 GMT Received: from prv3-mh.provo.novell.com (victor.provo.novell.com [137.65.250.26]) by userp2030.oracle.com with ESMTP id 1wbka3xrwq-1 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 21 Aug 2015 07:43:50 +0000 Received: from ghe-pc.lab.bej.apac.novell.com (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (TLS encrypted); Fri, 21 Aug 2015 01:43:40 -0600 From: Gang He To: mfasheh@suse.com, rgoldwyn@suse.de, ghe@suse.com Date: Fri, 21 Aug 2015 15:43:18 +0800 Message-Id: <1440143000-24956-3-git-send-email-ghe@suse.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1440143000-24956-1-git-send-email-ghe@suse.com> References: <1440143000-24956-1-git-send-email-ghe@suse.com> X-ServerName: victor.provo.novell.com X-Proofpoint-Virus-Version: vendor=nai engine=5700 definitions=7899 signatures=670626 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=5 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1507310000 definitions=main-1508210127 Cc: linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH 2/4] ocfs2: add errno and macro definitions X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Add new errno, macro definitions and header file inclusion, which will be used for file extent block online check. Signed-off-by: Gang He --- fs/ocfs2/filecheck.c | 4 ++++ fs/ocfs2/filecheck.h | 1 + fs/ocfs2/journal.h | 3 +++ 3 files changed, 8 insertions(+) diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c index 4b5a673..e8bc0cf 100644 --- a/fs/ocfs2/filecheck.c +++ b/fs/ocfs2/filecheck.c @@ -31,7 +31,10 @@ #include "ocfs2.h" #include "ocfs2_fs.h" #include "stackglue.h" +#include "dlmglue.h" #include "inode.h" +#include "alloc.h" +#include "journal.h" #include "filecheck.h" @@ -45,6 +48,7 @@ static const char * const ocfs2_filecheck_errs[] = { "INPROGRESS", "READONLY", "INVALIDINO", + "INVALIDEXT", "BLOCKECC", "BLOCKNO", "VALIDFLAG", diff --git a/fs/ocfs2/filecheck.h b/fs/ocfs2/filecheck.h index 5ec331b..e9c3fe6 100644 --- a/fs/ocfs2/filecheck.h +++ b/fs/ocfs2/filecheck.h @@ -32,6 +32,7 @@ enum { OCFS2_FILECHECK_ERR_INPROGRESS, /* In progress */ OCFS2_FILECHECK_ERR_READONLY, /* Read only */ OCFS2_FILECHECK_ERR_INVALIDINO, /* Invalid ino */ + OCFS2_FILECHECK_ERR_INVALIDEXT, /* Invalid extent block */ OCFS2_FILECHECK_ERR_BLOCKECC, /* Block ecc */ OCFS2_FILECHECK_ERR_BLOCKNO, /* Block number */ OCFS2_FILECHECK_ERR_VALIDFLAG, /* Inode valid flag */ diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h index f4cd3c3..8ab70cd 100644 --- a/fs/ocfs2/journal.h +++ b/fs/ocfs2/journal.h @@ -350,6 +350,9 @@ void ocfs2_journal_dirty(handle_t *handle, struct buffer_head *bh); /* simple file updates like chmod, etc. */ #define OCFS2_INODE_UPDATE_CREDITS 1 +/* extent block update */ +#define OCFS2_EXTENT_BLOCK_UPDATE_CREDITS 1 + /* extended attribute block update */ #define OCFS2_XATTR_BLOCK_UPDATE_CREDITS 1