[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v20210601 04/38] tools: add readv_exact to libxenctrl

  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Wed, 2 Jun 2021 13:05:11 +0200
  • Arc-authentication-results: i=1; strato.com; dkim=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1622631920; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Cc:Date: From:Subject:Sender; bh=mmwAcczl400Nz90EdzHL45etZJkSIEL2HdzsRVjHS/o=; b=bcxGcFYlC+ShPevvdADUhieQGevYTDPSercDItCAapvcu07LfQYYPBTEY4oGSa7PsB Kqc3dGka2UaVml9JP5Jyod8wY+GWoxy//VNrnjEGPwXMRPuF3mwrdqtVPRR6aGU1q7/+ Zow06NU779h+L3347dji+c9d9vcJ2I0yU1+jyCRe4oY/u/VyMs1sjCOdCuDu3l5FReqO dX00Aq+jeAhmZcUzoeARHbsN0bfU8S0ZHKXL+s7WeXfdbSIz8F+poR2VFOPKgES76pZX 3R7+PpvbIkZjrKmklXpwKuHE1YBMzuopTQWxUdSmSRjApuKkVxqqlYVQeCZPHOtArGqm 1GNw==
  • Arc-seal: i=1; a=rsa-sha256; t=1622631920; cv=none; d=strato.com; s=strato-dkim-0002; b=oBwNBlC4YklEwQyOooA0XQdZdLPTkql78IQaU+Z5BpHmb46oXZxLJrPwFMXuZf6Q1s iDereLW2aBbtfmjz7NixaZPr837ersCZAbndvmJ5IixFGxt9rfGZUbe4J1f6WRXD6vY/ 0e37QqHgBuYMAirUhtVfLRz5J4cFr7R8hc1i2kMTsmpvI1yPtMpytBApH1naUppRka3Y JgEOnN9SmjqWjgkFvDL8sy3h0KIIz7gmGaBcuG60Bfir9mlnTO25vDQODYXTSqZaSjEZ pOCOGC+6lbJukUDSHl4OAzm0glgn4EAsKMC+YyNY9ZqcpPKJ7WAu3XBFDJLltb63+0O6 GxYQ==
  • Authentication-results: strato.com; dkim=none
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 02 Jun 2021 11:05:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Am Wed, 2 Jun 2021 12:57:10 +0200
schrieb Olaf Hering <olaf@xxxxxxxxx>:

> > This will stop the loop, even if idx hasn't reached iovcnt.  
> Yes, it will trigger yet another readv().
> The "while" might be a leftover from a variant which used repeated read_exact 
> to finish the function. It should become a "if", and the "len = 0" can be 
> removed.

I think the code is correct.

The while() loop checks if the last iov had a short read, and finishes that iov 
with read_exact.

I will add a comment, if that helps.


Attachment: pgpl9B7Maml01.pgp
Description: Digitale Signatur von OpenPGP



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.