From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Date: Sun, 19 Jun 2011 22:35:30 +0000 Subject: Re: reorganized struct inode results in unaligned accesses Message-Id: List-Id: References: In-Reply-To: (Linus Torvalds's message of "Sun, 19 Jun 2011 09:51:24 -0700") MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Linus Torvalds Cc: Meelis Roos , Linux Kernel list , sparclinux@vger.kernel.org Linus Torvalds writes: > > Dang. I guess it needs to be made "unsigned long" again. Which is a > shame, because we only use a couple of bits from there, and "struct > inode" really is much too big already. In the past it was usually enough to just align it to alignof(unsigned long), not actually make it long. struct page went through this a long time ago. This could cause r-m-w races with the next field in theory, but assuming it's reasonably read-only (ie only set up at inode creation time) that should be fine. -Andi -- ak@linux.intel.com -- Speaking for myself only From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754905Ab1FSWg7 (ORCPT ); Sun, 19 Jun 2011 18:36:59 -0400 Received: from mga02.intel.com ([134.134.136.20]:19714 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754825Ab1FSWg6 (ORCPT ); Sun, 19 Jun 2011 18:36:58 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.65,390,1304319600"; d="scan'208";a="16943613" From: Andi Kleen To: Linus Torvalds Cc: Meelis Roos , Linux Kernel list , sparclinux@vger.kernel.org Subject: Re: reorganized struct inode results in unaligned accesses References: Date: Sun, 19 Jun 2011 15:35:30 -0700 In-Reply-To: (Linus Torvalds's message of "Sun, 19 Jun 2011 09:51:24 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds writes: > > Dang. I guess it needs to be made "unsigned long" again. Which is a > shame, because we only use a couple of bits from there, and "struct > inode" really is much too big already. In the past it was usually enough to just align it to alignof(unsigned long), not actually make it long. struct page went through this a long time ago. This could cause r-m-w races with the next field in theory, but assuming it's reasonably read-only (ie only set up at inode creation time) that should be fine. -Andi -- ak@linux.intel.com -- Speaking for myself only