From: Ian Jackson Subject: Re: [PATCH V5 2/7] libxl_read_file_contents: add new entry to read sysfs file Date: Tue, 30 Jun 2015 10:42:54 +0100 Message-ID: <21906.25758.111852.133475@mariner.uk.xensource.com> References: <1435226838-3067-1-git-send-email-cyliu@suse.com> <1435226838-3067-3-git-send-email-cyliu@suse.com> <21899.57676.368102.982820@mariner.uk.xensource.com> <558D7442020000660004C2F1@relay2.provo.novell.com> <21901.20009.85407.581628@mariner.uk.xensource.com> <55918B4E0200006600042119@relay2.provo.novell.com> <21905.9050.452111.208124@mariner.uk.xensource.com> <559264D90200006600042819@relay2.provo.novell.com> <21906.23698.778991.627734@mariner.uk.xensource.com> <5592D2900200006600042C05@relay2.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5592D2900200006600042C05@relay2.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Chun Yan Liu Cc: Juergen Gross , wei.liu2@citrix.com, ian.campbell@citrix.com, george.dunlap@eu.citrix.com, xen-devel@lists.xen.org, Jim Fehlig List-Id: xen-devel@lists.xenproject.org Chun Yan Liu writes ("Re: [PATCH V5 2/7] libxl_read_file_contents: add new entry to read sysfs file"): > >>> On 6/30/2015 at 05:08 PM, in message > <21906.23698.778991.627734@mariner.uk.xensource.com>, Ian Jackson > wrote: > > Maybe sysfs will grow support for bigger files in the future. (Also, > > that is actually a description of the kernel internals, not of the > > syscall API). > > Yes, that's about kernel internals. But syscall API will finally call > kernel implementation. From those description, we knows why > fstat always return size 4096 (on x86_64, although actual file > content length is less). And it's not possible the file is changed > into a bigger size during we are reading it. About whether it'll > be changed in future, really don't know. Right. My point was that an internals document is a poor guide to future behaviour. So, > As to adding a check, it's certainly OK. I can update. Yes, please. Thanks, Ian.