From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Airlie Subject: Re: [PATCH 05/19] drm: move dev_mapping to the minor node Date: Mon, 30 Apr 2012 19:04:28 +0100 Message-ID: References: <1334254784-3200-1-git-send-email-ihadzic@research.bell-labs.com> <1334254784-3200-6-git-send-email-ihadzic@research.bell-labs.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-yw0-f49.google.com (mail-yw0-f49.google.com [209.85.213.49]) by gabe.freedesktop.org (Postfix) with ESMTP id A5C7A9F752 for ; Mon, 30 Apr 2012 11:04:29 -0700 (PDT) Received: by yhjj52 with SMTP id j52so1668187yhj.36 for ; Mon, 30 Apr 2012 11:04:29 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Ilija Hadzic Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Mon, Apr 30, 2012 at 6:53 PM, Dave Airlie wrote: >> >> Do you have pointers to that discussion (assuming it was on sime mailing >> list)? The least I can do, while I am at it, is try to understand it and >> see if I can incorporate some ideas from there in the rework of the patch. > > Nope it was an offhand discussion on irc while we were talking about > some other ugly code. Okay I think it was the code in coda, if (coda_inode->i_mapping == &coda_inode->i_data) coda_inode->i_mapping = host_inode->i_mapping; /* only allow additional mmaps as long as userspace isn't changing * the container file on us! */ else if (coda_inode->i_mapping != host_inode->i_mapping) { spin_unlock(&cii->c_lock); return -EBUSY; } We could use code like that to change the i_mapping, instead of failing. Dave.