Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp6539pxb; Tue, 28 Sep 2021 14:01:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdapHIv+oHLrJr3CuLXWzOivw0AFrjGXCsSE/rnuVMB37Jqd6MLJ7iCj6zyjha7smcinRO X-Received: by 2002:a63:441c:: with SMTP id r28mr6297951pga.94.1632862910343; Tue, 28 Sep 2021 14:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632862910; cv=none; d=google.com; s=arc-20160816; b=J2K5jA02e6WlFrm8F/s8svY6hnl1I+8E7SbBps9QQvcuv9FTy+B7nSxmGDsEwQo4NN a9DgeKE6hbT/mrBRT+tIQ7tRm4CdDKipJDRx/CM9v6nbArUlR0zi6lD+guSV6liZmfIA ++MoyCzypH0n+D1OsP8Y7SqnM10IZBDPaa8Kzn1swjl++pT280fsVf7DoRZlzERob6/y LnumQEUimOaEu6M74zqFUP93B3vb1Jdk47gxqv+PPKoHb1Hqj3GQ2LA48Uy3MJWFYSEA epcl/jnFI/OcNNV+pbUD+Tg7dD5v026BL15YKRvDKxLR8Ah55Z+sr7TY6ikcMOgwVgvC 5Irw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vdJT9ywrBEcF/0YQnrMIH0LVh5kwdgvAJzt2WIyxCEo=; b=orYYEjO5M2tUAVdtYJwpkyaxQfG7YH3b7rmrN4co8NbX8eRQnYx0CKhuQPKieeAJuJ 4BetU+j+AwR6pLnRxZI/ymKfUQgZYcTajuR4NBJT0eeuqe4bRS0XPLvPg/tTij1SSqhr 6rHlbwtr7X2cxUXRc8ZV2QgU4er9voVGBoCkM9+Qb8+Re/P9o3ttXIoCiOfGab13oeWG vl960YFpUUgV3CJBTopLbuGaV/Ph+3lWijalcBNWIeT3AG9LzE/d9LBFpTGrU2XpnBHX QpzUzsT6aT2LLU6zB+CpqjZLtajWFnS7tPjwbpogZcXAILNowDHkT0CdtFgfJT5Roqz/ J84A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DKalrk9X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m6si81160pjd.8.2021.09.28.14.01.36; Tue, 28 Sep 2021 14:01:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DKalrk9X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242846AbhI1VAk (ORCPT + 99 others); Tue, 28 Sep 2021 17:00:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:35414 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242845AbhI1VAj (ORCPT ); Tue, 28 Sep 2021 17:00:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9C6E560FC0; Tue, 28 Sep 2021 20:58:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632862739; bh=Gl+jfadpVvNOg2XJ45MvVWQ8l+OKiOdvBFfmcAUq9WA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DKalrk9XQuztHgAP4K4twJc90Mpy5HxW/4EL063Esk1cB2aTpkCDPOwoJx7WfgPck BoRArW/lQRw44gXDmpQJ/oanTSIBeUESshlmOOGgW/VEAtVB5yt0GmkY/L/bHa1qI4 /FI00FFVBLAfAwKjIyaMUnl8zoxi8GnryHxdQdNSfFJ+C2NZaDjzICaon8YuT8TVFf 1Pk28j9eP3fmqiqtoFDX5XYc7GhL3NWE0s3/T0FeewGOg5FVSc6+sowAss2HgxErJl 8A3OirUoaKY5nMbmZKFgIa3wDKNJD5feGoDNgmjCstKS7e0GdO+pVzc82WKZg5hocY qweA4xvReocYg== Date: Tue, 28 Sep 2021 13:58:58 -0700 From: Jaegeuk Kim To: Daeho Jeong Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com, Daeho Jeong Subject: Re: [PATCH] f2fs-tools: fall back to the original version check when clock_gettime is not supported Message-ID: References: <20210928204658.2230524-1-daeho43@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210928204658.2230524-1-daeho43@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Merged to address android build breakage. On 09/28, Daeho Jeong wrote: > From: Daeho Jeong > > In lower versions than macOS 10.12, they don't support clock_gettime > function. It breaks the build, so we need to fall back to the original > kernel version check algorithm, in that case. > > Signed-off-by: Daeho Jeong > --- > fsck/mount.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/fsck/mount.c b/fsck/mount.c > index 7c4c681..c928a15 100644 > --- a/fsck/mount.c > +++ b/fsck/mount.c > @@ -975,6 +975,16 @@ int validate_super_block(struct f2fs_sb_info *sbi, enum SB_ADDR sb_addr) > MSG(0, "Info: MKFS version\n \"%s\"\n", c.init_version); > MSG(0, "Info: FSCK version\n from \"%s\"\n to \"%s\"\n", > c.sb_version, c.version); > +#if defined(__APPLE__) > + if (!c.no_kernel_check && > + memcmp(c.sb_version, c.version, VERSION_NAME_LEN)) { > + c.auto_fix = 0; > + c.fix_on = 1; > + memcpy(sbi->raw_super->version, > + c.version, VERSION_NAME_LEN); > + update_superblock(sbi->raw_super, SB_MASK(sb_addr)); > + } > +#else > if (!c.no_kernel_check) { > struct timespec t; > u32 prev_time, cur_time, time_diff; > @@ -1007,6 +1017,7 @@ int validate_super_block(struct f2fs_sb_info *sbi, enum SB_ADDR sb_addr) > update_superblock(sbi->raw_super, SB_MASK(sb_addr)); > } > out: > +#endif > print_sb_state(sbi->raw_super); > return 0; > } > -- > 2.33.0.685.g46640cef36-goog