From owner-freebsd-current@FreeBSD.ORG Thu May 7 06:47:34 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7D098CC for ; Thu, 7 May 2015 06:47:34 +0000 (UTC) Received: from mail-ig0-f172.google.com (mail-ig0-f172.google.com [209.85.213.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B86D51F1C for ; Thu, 7 May 2015 06:47:34 +0000 (UTC) Received: by igbhj9 with SMTP id hj9so37446207igb.1 for ; Wed, 06 May 2015 23:47:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=xnG5Cu78zkSb1L9zDztf0Q0vGvmgPAuPQveRhhJOQho=; b=JPcTEUgwOu7nMsck/Zc3vfjAXXHPQl1zkohI78kIGcjfdn0/93995jy5WsSwEulM5w FeWhRo86LgdB2unlnMUV4gF4M4d/MuLpT7wE3Ui84feUe/GxS+IuoaBVbjjGO+brXijG kS6nY9RcJiiNsg7GfkDmx2BQdGzTfDzv19W9pcrCw+rTSZckNWpDGhGPfDGyN+Zk37+d 6vNAaDByLV71uwfA7i8fDR2o/KDl/qJtQULFjR5O4ZWduG86+fFgqV+0LcWMGW6AKr/7 xxBDsltY4k55e8nuBQ/yPmwtyGwPUeQD0hNhp4BCbPGIS2gQu7vTDVXE2YUIFI0saZxd GdZA== X-Gm-Message-State: ALoCoQmMI1PVzjnrc0klfzbOvJ9fOwW2hm+LKQsAx0TzMSKR0utZEwTle0Wmu8HfJffv6ifl3wGL MIME-Version: 1.0 X-Received: by 10.107.136.158 with SMTP id s30mr2960237ioi.65.1430981247882; Wed, 06 May 2015 23:47:27 -0700 (PDT) Received: by 10.36.153.1 with HTTP; Wed, 6 May 2015 23:47:27 -0700 (PDT) In-Reply-To: <1588878108.33116674.1430961004678.JavaMail.root@uoguelph.ca> References: <1588878108.33116674.1430961004678.JavaMail.root@uoguelph.ca> Date: Thu, 7 May 2015 07:47:27 +0100 Message-ID: Subject: Re: nmount, mountd drops high order MNT_xx flags during a mount update From: Doug Rabson To: Rick Macklem Cc: freebsd current , =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= , David.Boyd49@twc.com Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 06:47:35 -0000 You could add a single integer-valued vfsopt which holds the high-order bits of f_flags? On 7 May 2015 at 02:10, Rick Macklem wrote: > David Boyd reported a problem to freebsd-current@ w.r.t. the > MNT_AUTOMOUNTED > flag getting cleared by mountd. > http://docs.FreeBSD.org/cgi/mid.cgi?1429477202.29812.38.camel > I just took a look at this and it's kinda ugly... > > mountd acquires a list of mounts via getmntinfo() and then does an > nmount() for each of them to get rid of any exports. It uses > f_flags from the statfs returned by getmntinfo() as the 3rd > argument to nmount(). > --> Since nmount()s 3rd argument is a "int", it silently drops any > MNT_xx flag in the high order 32bits of f_flags. At this time, > it happens that MNT_AUTOMOUNTED is the only one, but... > > I can think of a couple of ways to fix this, but I don't like any of > them;-) > > 1) I suppose mountd could check for each flag set in f_flags and generate > a vfsopts string for it, but that means that every time a new flag that > can be updated is added to MNT_xx, this mountd.c code would have to > updated. > --> Ugly!! > > 2) Require that all flags in MNT_UPDATEMASK be in the low order 32bits. > I wouldn`t mind this except in means that the MNT_xx flags must be > redefined > and I don`t think that could get MFC`d. > > 3) Add a new newernmount(2) which has a 64bit flags argument instead of > int. > > Hopefully someone can think of a nice way to fix this, rick > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >