Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2596921imd; Fri, 2 Nov 2018 14:16:48 -0700 (PDT) X-Google-Smtp-Source: AJdET5f5VPJVrwiqn0VftQ0WNRvOupBV7G2yDJy09eZ0LZ4n/hI20pGFh/B24fA0I5P0hCd0lXQ5 X-Received: by 2002:a63:eb42:: with SMTP id b2-v6mr12160144pgk.348.1541193408356; Fri, 02 Nov 2018 14:16:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541193408; cv=none; d=google.com; s=arc-20160816; b=0M1PSR3OP5lx+jU2rJkxWQGfXCpcvxWp146scDgzxPjsRKMqBFSyI/Q8ctEwBCcmfH rHvoqej7U3XEv68jDy/Uvoi+L9RfAYGroAMZ8r4qo1h+b4CGpNHZDqvnG1DJIS+RtiuL xJakCiPGH+IheNuzn31QRYsTEBDpvxeJjtfLlR0CoH51BZQIy+oy713HSRSe4DSr8ntA S5PSd0yUTohXRk1l6gsu7vYHdhpQCh1lAdMvNYY7HDdSLXS6o0LGGczMl7RuPG5wParn I+9RnlUKkT3U1Q/THTfZLJFlVi38OWZFSNwzJP8vgVtweDZmtBzHfd4q1QFUSDUyBNzx vLow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rcDaxZ5GsMljxS5kqEPJnWSKgnvvtV15/zoyPP2MZe8=; b=fqMHKjHtDsLJq1saIWO/HOOFdJ6uqLDP9YgefoW0Nk0Ym6RDxSk2aFKugtxtR4vRcc gP3ul0rQskeUPjkOkGCP2nO5MK7YU06V6SjJDoUq2QZUEpX43sTHGPFywu5sXTyR7z3d Ib5bJ9wnTgSkEaiCqBQRrarVM7VOLB3dYKNSxKA3jjH1L9jMx33lS3cfUv4bwYIYfoAa 1XUmhuccpuQzt5zx8KdZGMct+lBT3Lp1OePNC9nYoTdDPJJDur2Wtk7aHGC6uPi4l2Zh R4ivY6RBp34iWdGUpwZmNR/syFsSFt1cW8/B1DyCY1dcadQeLq0GUj0qIzwkkem5XqFZ eMZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b=PeFDjQzS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cisco.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1-v6si35501858pgd.528.2018.11.02.14.16.33; Fri, 02 Nov 2018 14:16:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b=PeFDjQzS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cisco.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728176AbeKCGXd (ORCPT + 99 others); Sat, 3 Nov 2018 02:23:33 -0400 Received: from alln-iport-4.cisco.com ([173.37.142.91]:37735 "EHLO alln-iport-4.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726106AbeKCGXc (ORCPT ); Sat, 3 Nov 2018 02:23:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1094; q=dns/txt; s=iport; t=1541193289; x=1542402889; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=K6AS13gXCOwa9AguBgQyVGngMmafF7uZ3EdQIES0qPI=; b=PeFDjQzStRMDgmbet4x7yNdF9zTRwfepcWIja3cQmNvqi3PVNmZuBz58 lHU4K6q6l7MZjPqrUPevQmtVdaH5JP5Zor1JwjgrGMAPKwsH8T1F8TXPm cFT6wjamzSEA+UG68YBQQu9W5jz4y7D9R4tgmHKrEb3cyBXpq4wTTrKX9 0=; X-IronPort-AV: E=Sophos;i="5.54,457,1534809600"; d="scan'208";a="195671246" Received: from alln-core-11.cisco.com ([173.36.13.133]) by alln-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Nov 2018 21:14:48 +0000 Received: from zorba ([10.24.90.186]) by alln-core-11.cisco.com (8.15.2/8.15.2) with ESMTPS id wA2LEj39016747 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 2 Nov 2018 21:14:47 GMT Date: Fri, 2 Nov 2018 14:14:44 -0700 From: Daniel Walker To: Richard Weinberger Cc: Al Viro , nkela@cisco.com, xe-linux-external@cisco.com, LKML , "linux-mtd @ lists . infradead . org" , Rod Whitby , David Woodhouse Subject: Re: [PATCH] Make JFFS2 endianness configurable Message-ID: <20181102211444.nqqqbd4w5diyqrfw@zorba> References: <20181101225603.17806-1-nkela@cisco.com> <20181102000236.rqho7txtb7gv543t@zorba> <20181102003434.GW32577@ZenIV.linux.org.uk> <20181102140420.jiuhcsrahoeqe5vk@zorba> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) X-Auto-Response-Suppress: DR, OOF, AutoReply X-Outbound-SMTP-Client: 10.24.90.186, [10.24.90.186] X-Outbound-Node: alln-core-11.cisco.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 02, 2018 at 09:15:06PM +0100, Richard Weinberger wrote: > On Fri, Nov 2, 2018 at 3:04 PM Daniel Walker wrote: > > Do you have any thought on how to implement it ? I was think abstracting the > > endian functions in the nodelist.h > > Yes, see what UFS does. > > > static inline jint16_t cpu_to_je16(jint16_t x) { > > if (check_big_endian()) { > > return cpu_to_be16(x); > > } else if (check_little_endian()) { > > return cpu_to_le16(x); > > } > > } > > > > but how would you setup the checking ? > > Make it a mount option and store the endianness mode in the super block. It's actually a mkfs option currently. I'm not sure how that factors in, from the mkfs.jffs2 man page, -l, --little-endian Create a little-endian JFFS2 image. Default is to make an image with the same endianness as the host. -b, --big-endian Create a big-endian JFFS2 image. Default is to make an image with the same endianness as the host. Daniel