From patchwork Tue May 12 03:48:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaegeuk Kim X-Patchwork-Id: 6385361 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 94667BEEE1 for ; Tue, 12 May 2015 03:49:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C6E53203DA for ; Tue, 12 May 2015 03:49:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EB22A202D1 for ; Tue, 12 May 2015 03:49:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752585AbbELDsx (ORCPT ); Mon, 11 May 2015 23:48:53 -0400 Received: from mail.kernel.org ([198.145.29.136]:60057 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752550AbbELDsw (ORCPT ); Mon, 11 May 2015 23:48:52 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 991B1203DA; Tue, 12 May 2015 03:48:51 +0000 (UTC) Received: from localhost (unknown [166.170.42.189]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BA4ED202D1; Tue, 12 May 2015 03:48:50 +0000 (UTC) From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH 1/3] f2fs: disable the discard option when device does not support Date: Mon, 11 May 2015 20:48:46 -0700 Message-Id: <1431402528-24156-1-git-send-email-jaegeuk@kernel.org> X-Mailer: git-send-email 2.1.1 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch disables given discard option when device does not support it. Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index bd8a405..19438f2 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1186,6 +1186,7 @@ try_onemore: f2fs_msg(sb, KERN_WARNING, "mounting with \"discard\" option, but " "the device does not support discard"); + clear_opt(sbi, DISCARD); } sbi->s_kobj.kset = f2fs_kset;