From patchwork Thu Nov 25 09:53:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miao Xie X-Patchwork-Id: 356452 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAP9uGS2025571 for ; Thu, 25 Nov 2010 09:56:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751902Ab0KYJzu (ORCPT ); Thu, 25 Nov 2010 04:55:50 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:50250 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751886Ab0KYJzq (ORCPT ); Thu, 25 Nov 2010 04:55:46 -0500 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 6F749170E92; Thu, 25 Nov 2010 17:55:44 +0800 (CST) Received: from mailserver.fnst.cn.fujitus.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id oAP9pBtr013792; Thu, 25 Nov 2010 17:51:11 +0800 Received: from [10.167.225.64] ([10.167.225.64]) by mailserver.fnst.cn.fujitus.com (Lotus Domino Release 8.5.1FP4) with ESMTP id 2010112517560058-101239 ; Thu, 25 Nov 2010 17:56:00 +0800 Message-ID: <4CEE322E.4020204@cn.fujitsu.com> Date: Thu, 25 Nov 2010 17:53:50 +0800 From: Miao Xie Reply-To: miaox@cn.fujitsu.com User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100413 Fedora/3.0.4-2.fc13 Thunderbird/3.0.4 MIME-Version: 1.0 To: Chris Mason , Josef Bacik CC: Linux Btrfs , Liu Bo Subject: [RFC PATCH 1/4] Btrfs: add filesystem state for error handle X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2010-11-25 17:56:00, Serialize by Router on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2010-11-25 17:56:01, Serialize complete at 2010-11-25 17:56:01 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 25 Nov 2010 09:56:17 +0000 (UTC) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 8db9234..78b4c34 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -294,6 +294,16 @@ static inline unsigned long btrfs_chunk_item_size(int num_stripes) #define BTRFS_FSID_SIZE 16 #define BTRFS_HEADER_FLAG_WRITTEN (1ULL << 0) #define BTRFS_HEADER_FLAG_RELOC (1ULL << 1) + +/* + * File system states + */ + +/* Unmount cleanly */ +#define BTRFS_SUPER_FLAG_VALID (1ULL << 2) +/* Errors detected */ +#define BTRFS_SUPER_FLAG_ERROR (1ULL << 3) + #define BTRFS_SUPER_FLAG_SEEDING (1ULL << 32) #define BTRFS_SUPER_FLAG_METADUMP (1ULL << 33) @@ -1050,6 +1060,9 @@ struct btrfs_fs_info { unsigned metadata_ratio; void *bdev_holder; + + /* filesystem state */ + unsigned short fs_state; }; /*