From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1a8l47-0003Et-KN for mharc-grub-devel@gnu.org; Tue, 15 Dec 2015 03:34:35 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8l44-00038d-Lb for grub-devel@gnu.org; Tue, 15 Dec 2015 03:34:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8l3z-00037N-Lf for grub-devel@gnu.org; Tue, 15 Dec 2015 03:34:32 -0500 Received: from mail-lb0-x234.google.com ([2a00:1450:4010:c04::234]:35124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8l3z-00037J-DZ for grub-devel@gnu.org; Tue, 15 Dec 2015 03:34:27 -0500 Received: by mail-lb0-x234.google.com with SMTP id u9so1023175lbp.2 for ; Tue, 15 Dec 2015 00:34:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=OvYvocRCCxDmljzxckioJxVoiZkmID7f0v2qLhRvUp8=; b=nd6G6Qc39H0KQTgL8TuhkHcOJGaSu3DiMy9u7ce/p3QjihDJ3B6Se37c+DEJwD6CnZ 7Qz64SGKjIZ/hfmb533XnMZdHqxOWwGi+m244ssh9Cgi882GvauEyHxOe2IPa6MDoNuU +dDLpiH5byBwIPsFZ+bjbR327/x0Jhz93c8WXul74MQsKkjLmCp1dsuhy8Udvh39fqE7 R+si0qHaoIz0ADbRyHcCs1PMQKtQk6hb2M0L3k0GSkR6aTGd1/05Gnf92KmE/r3ZW8KW 02ZVkqtmpq6zz5MZa6wXwbQQuYp4QObXPVZxyPgibonSPExhd1aAT8qARKH750rBwT5w WbOg== X-Received: by 10.112.155.6 with SMTP id vs6mr445400lbb.87.1450168466471; Tue, 15 Dec 2015 00:34:26 -0800 (PST) Received: from [192.168.1.41] (ppp91-76-25-247.pppoe.mtu-net.ru. [91.76.25.247]) by smtp.gmail.com with ESMTPSA id ds5sm44836lbc.0.2015.12.15.00.34.25 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Dec 2015 00:34:25 -0800 (PST) Subject: Re: [f2fs-dev] [PATCH v4] F2FS support To: Jaegeuk Kim References: <1427185140-41120-1-git-send-email-jaegeuk@kernel.org> <20150403224908.GB25673@jaegeuk-mac02.mot.com> <20151119212824.GA11666@jaegeuk.local> <566E7DAA.4010202@gmail.com> <20151215003421.GD48918@jaegeuk.local> From: Andrei Borzenkov X-Enigmail-Draft-Status: N1110 Message-ID: <566FD090.1080906@gmail.com> Date: Tue, 15 Dec 2015 11:34:24 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20151215003421.GD48918@jaegeuk.local> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c04::234 Cc: The development of GNU GRUB , linux-f2fs-devel@lists.sourceforge.net X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Dec 2015 08:34:33 -0000 15.12.2015 03:34, Jaegeuk Kim пишет: > Change log from v3: > o add grub_test_bit_le() ... > + > +static inline int > +grub_f2fs_test_bit_le (int nr, const grub_uint8_t *addr) > +{ > + const grub_int32_t *p = (const grub_int32_t *)addr; > + > + nr = nr ^ 0; It does nothing. > + > + return p[nr >> 5] & (1 << (nr & 31)); > +} Well, you still miss the point - if you are working with integers you must shift differently depending on whether we are running big or little endian. But as I mentioned before, we know that bitmap is little endian so we can work with bytes and be independent of byte order. Could you test if this works for you: static inline int grub_f2fs_test_bit_le (int nr, const grub_uint8_t *addr) { return addr[nr >> 3] & (1 << (nr & 7)); }