From owner-freebsd-xen@freebsd.org Mon Mar 7 12:31:42 2016 Return-Path: Delivered-To: freebsd-xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CF1B9DB56B for ; Mon, 7 Mar 2016 12:31:42 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (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 A26C21A6 for ; Mon, 7 Mar 2016 12:31:41 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id l68so106270603wml.0 for ; Mon, 07 Mar 2016 04:31:41 -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-transfer-encoding; bh=MZFgRG1FDenaWZ1Tu0681Wv0xkXiFriMN50JwVIcQ5c=; b=n2N0z+ZCq+XSIZgkt7MNlLgZg8D9wMkGFfDpI3/9ONsyvaxvZooRminhmRJ/BGfhbt zFYj4/xBqvCykPi5tnRp5v/qnyK/LOgI1qYEOiGdH2gdFcPmjEHMEgOpt8RvhTgyZe79 PLTqDQ48+RgbrHl7q+8dopVGSgEVpZBJZ7KU6UyrO5S5SdNmSO/MsYk5Jpqmm2bXKgmN 0VfJTN+T/cv3IR1RdPvsAU5IhScraNwlAAfMCgeyFL3Kxka43J6W7FvvIj3WpdBH3M4m zNDj6sE3woMYPgfL26nCnHORECjiAKUfRtRbiYPDD72MdNT2lQEKhbjXjYzgyRoSp4R6 r8Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=MZFgRG1FDenaWZ1Tu0681Wv0xkXiFriMN50JwVIcQ5c=; b=iahpjKmRmANI+kfVxqohAKylK/CdrIoQnGMs/7MKCBadJAZuI3yhl1N4AWsAVg5p9y IPl6Yc6rABJs5uybHz6mu6FjSE/ZYREbJsQhcvbeAYYdUHN6/MMbBn088nx5hzaZOOT2 Zxx1ktWwBTCKWKKUvUjzcBNZ8C7be5y/W19ICiKHsvfWJW3s9bqJw72xRGAS0iVpKMXq 1948cMIca24T8bQv5T7kF9M17C1AWaTsVSvUnHQgdLtUGAtk/SmcVQbSRLUw65fbdRhq yo9amRUWhxkiAydbzZpFyQTW+VP84+S4n0EbaxD8rK0Ya65SXTB3MSQhTkWVw1vXSpdt Z4Xw== X-Gm-Message-State: AD7BkJIqgVGAZoJxd6uMAclx8hw6hDI4QMjzvzBAdytMl4MMKgyeZKFOGRqtKXDj+7zSuQ== X-Received: by 10.28.10.149 with SMTP id 143mr12085585wmk.38.1457353900113; Mon, 07 Mar 2016 04:31:40 -0800 (PST) Received: from [10.0.2.151] ([147.83.40.10]) by smtp.googlemail.com with ESMTPSA id y62sm13424039wmg.12.2016.03.07.04.31.38 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Mar 2016 04:31:38 -0800 (PST) Subject: Re: Porting the block-iscsi hotplug script To: FreeBSD XEN References: <553DEB97.5000300@entel.upc.edu> <555EF542.3090002@citrix.com> <555F9B3F.1000600@entel.upc.edu> <55602512.1090702@citrix.com> <56C6FA2F.8040900@gmail.com> <56CAC8CB.8030107@gmail.com> <56CADEDA.4050007@citrix.com> <56CB0057.1060509@gmail.com> <56CB041E.1020009@citrix.com> <56CB2D90.5080809@gmail.com> <56CB34BA.6060809@citrix.com> <56CC24BD.6050609@gmail.com> <56CC32E5.5010101@citrix.com> <56CC7637.3080408@gmail.com> <56CF5668.6090605@citrix.com> <56D0091F.80408@gmail.com> <56D02863.7040100@citrix.com> <56D03D95.9090509@gmail.com> <56D04E5F.8070901@citrix.com> <56D42A28.8050701@gmail.com> <56D434FC.8030905@citrix.com> <56D57110.2060406@gmail.com> <56D587D8.6030702@citrix.com> <56D590EA.609@gmail.com> <56D591BA.4020303@gmail.com> <56D5929F.7040001@citrix.com> <56D5C722.3080205@gmail.com> <56D6B68D.8080809@citrix.com> <56D7FEFE.9050000@gmail.com> <56D97762.7000908@gmail.com> From: =?UTF-8?Q?Gustau_P=c3=a9rez?= Message-ID: <56DD74A9.3050709@gmail.com> Date: Mon, 7 Mar 2016 13:31:37 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 12:31:42 -0000 El 4/03/16 a les 16:54, Roger Pau Monné ha escrit: > > Linux already has some code to do this checking, but this also involves > taking a lock in order to make sure there's only one hotplug script > performing this check at the same time. > > The Linux function that performs this checking is in: > > http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/hotplug/Linux/block;h=2691b56951c9b82094471a141b9e0bed04abb929;hb=HEAD#l40 > > And the caller is: > > http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/hotplug/Linux/block;h=2691b56951c9b82094471a141b9e0bed04abb929;hb=HEAD#l275 > > If you take a look, the call to check_device_sharing is protected with the > "block" lock. > Thank you, today I wasn't unable to code, I hope I'll have some time this afternoon. Btw, In coding sh style, I don't want to bring in bash and add another dependency to the xen-tools port. Gustau