GNU bug report logs - #27666
[grep on GPFS filesystem] SEEK_HOLE problem

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: grep; Reported by: Moyard John <John.Moyard@HIDDEN>; dated Wed, 12 Jul 2017 11:58:02 UTC; Maintainer for grep is bug-grep@HIDDEN.

Message received at 27666 <at> debbugs.gnu.org:


Received: (at 27666) by debbugs.gnu.org; 20 Jul 2017 12:46:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 20 08:46:37 2017
Received: from localhost ([127.0.0.1]:48703 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dYAqi-0000jY-OE
	for submit <at> debbugs.gnu.org; Thu, 20 Jul 2017 08:46:36 -0400
Received: from mx1.redhat.com ([209.132.183.28]:47774)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eblake@HIDDEN>) id 1dYAqg-0000jK-GK
 for 27666 <at> debbugs.gnu.org; Thu, 20 Jul 2017 08:46:35 -0400
Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com
 [10.5.11.11])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.redhat.com (Postfix) with ESMTPS id 8587B267F7;
 Thu, 20 Jul 2017 12:46:28 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8587B267F7
Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com;
 dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com;
 spf=pass smtp.mailfrom=eblake@HIDDEN
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8587B267F7
Received: from [10.10.120.37] (ovpn-120-37.rdu2.redhat.com [10.10.120.37])
 by smtp.corp.redhat.com (Postfix) with ESMTP id 3FD8480A34;
 Thu, 20 Jul 2017 12:46:27 +0000 (UTC)
Subject: Re: bug#27666: [grep on GPFS filesystem] SEEK_HOLE problem
To: Moyard John <John.Moyard@HIDDEN>, Paul Eggert <eggert@HIDDEN>,
 "27666 <at> debbugs.gnu.org" <27666 <at> debbugs.gnu.org>
References: <4A209E6EBA46214D892C9CB9FDE889878D521203@HIDDEN>
 <b8d18def-22b7-b0f9-fc0f-74d39e23ba85@HIDDEN>
 <4A209E6EBA46214D892C9CB9FDE889878D52147C@HIDDEN>
 <79e0328a-2909-1389-6181-c403126161e0@HIDDEN>
 <4A209E6EBA46214D892C9CB9FDE889878D52198B@HIDDEN>
 <105b368a-9905-caf6-f3bf-a1eb320478e3@HIDDEN>
 <4A209E6EBA46214D892C9CB9FDE889878D521D84@HIDDEN>
From: Eric Blake <eblake@HIDDEN>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
Organization: Red Hat, Inc.
Message-ID: <39866ad1-8d6c-7425-79ea-35ffe5b73ca2@HIDDEN>
Date: Thu, 20 Jul 2017 07:46:26 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <4A209E6EBA46214D892C9CB9FDE889878D521D84@HIDDEN>
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="JboUk9ho4nxBXRNAq7lFOWSpso0UEVDEf"
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
 (mx1.redhat.com [10.5.110.30]); Thu, 20 Jul 2017 12:46:28 +0000 (UTC)
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 27666
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--JboUk9ho4nxBXRNAq7lFOWSpso0UEVDEf
Content-Type: multipart/mixed; boundary="1busAVx8fdvh9eDVsju0xU50kfKlbk5AV";
 protected-headers="v1"
From: Eric Blake <eblake@HIDDEN>
To: Moyard John <John.Moyard@HIDDEN>, Paul Eggert <eggert@HIDDEN>,
 "27666 <at> debbugs.gnu.org" <27666 <at> debbugs.gnu.org>
Message-ID: <39866ad1-8d6c-7425-79ea-35ffe5b73ca2@HIDDEN>
Subject: Re: bug#27666: [grep on GPFS filesystem] SEEK_HOLE problem
References: <4A209E6EBA46214D892C9CB9FDE889878D521203@HIDDEN>
 <b8d18def-22b7-b0f9-fc0f-74d39e23ba85@HIDDEN>
 <4A209E6EBA46214D892C9CB9FDE889878D52147C@HIDDEN>
 <79e0328a-2909-1389-6181-c403126161e0@HIDDEN>
 <4A209E6EBA46214D892C9CB9FDE889878D52198B@HIDDEN>
 <105b368a-9905-caf6-f3bf-a1eb320478e3@HIDDEN>
 <4A209E6EBA46214D892C9CB9FDE889878D521D84@HIDDEN>
In-Reply-To: <4A209E6EBA46214D892C9CB9FDE889878D521D84@HIDDEN>

--1busAVx8fdvh9eDVsju0xU50kfKlbk5AV
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 07/20/2017 04:03 AM, Moyard John wrote:
> Thank your very much for your detailed answer.
> "close(2)" is involved because a test case made to reproduce the proble=
m use a cp, initially a fortran code to make a copy, follow by a grep.
>=20
> I clearly understand your point of view about=20
>      reporting hole and NUL bytes
>      GPFS incompatibility with others programs/commands that could use =
SEEK_HOLE
> I try to take a quick look about this last point and don't find yet any=
 system command using it.
> Do you have an example of other command using SEEK_HOLE?

More and more commands are starting to make optimizations based on
SEEK_HOLE.  cp, tar, diff, grep, etc.  Programs like qemu-img REQUIRE a
working SEEK_HOLE for efficiently managing sparse virtual machine disk
images.

>=20
> In POSIX point of view, lseek(2) manpage precise this :
> SEEK_DATA and SEEK_HOLE are nonstandard extensions also present in Sola=
ris, FreeBSD, and DragonFly BSD
> They are proposed for inclusion in the next  POSIX  revision   (Issue 8=
)
> Do you have any information about it?

Here's the proposed POSIX wording:
http://austingroupbugs.net/view.php?id=3D415

Requiring close() to occur before SEEK_HOLE is accurate is a bug in GPFS
(if any other process can read() non-zero data but lseek(SEEK_HOLE)
still claims that section of the file is a hole, then the file system is
buggy, per the wording POSIX will be adding).


> Does compile 'grep' mechanism could avoid the use of SEEK_HOLE test ?

No. Avoiding a buggy SEEK_HOLE in grep won't fix all the other programs
(like cp, tar, diff) that are also negatively impacted by the buggy
SEEK_HOLE.  Fix the GPFS bug, and then all of the user-space apps will
no longer be impacted by the bug.

[By the way, top-posting is frowned on for technical lists].  I agree
with Paul's conclusion:

> Really, GPFS needs to be fixed. If GPFS can't support SEEK_HOLE correct=
ly, it should simply have lseek with SEEK_HOLE go to end-of-file; that wi=
ll work with 'grep' (albeit more slowly), and is the documented way that =
SEEK_HOLE is supposed to work on file systems that cannot support SEEK_HO=
LE directly.
>=20

--=20
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


--1busAVx8fdvh9eDVsju0xU50kfKlbk5AV--

--JboUk9ho4nxBXRNAq7lFOWSpso0UEVDEf
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAllwpiIACgkQp6FrSiUn
Q2rmPgf9E+IzPWGgzliJ0e5FLabxeVWuUw8pEUiRSaFDFGTRtyKCWTKohoJnyQ+k
X6JlypKInF8xtRXiHodQS4IgrNG8CF9VabBv8keNRdc26lVaqAubwZnZCvfAXFCV
7tOsjV5Awt/a9T9aqMKxxziN5u0jp78b79gndXc0mpEFDlInscDVSAg7BA1J+mIM
TvYVWns90jevYoBmwSghMrm5txR0Mu1LG5vawxLcr4z5YBzOYUjSz204vTf2Sb1B
XXVdCH+TqnRQxrXpUxym3B2zaeyBGXNTZMkubO8Z2dLfwmJDq+M8BCaeQ8NcsQZL
com49X/luvlCEfGI7L2yn2sl3G5C4w==
=wNFG
-----END PGP SIGNATURE-----

--JboUk9ho4nxBXRNAq7lFOWSpso0UEVDEf--




Information forwarded to bug-grep@HIDDEN:
bug#27666; Package grep. Full text available.

Message received at 27666 <at> debbugs.gnu.org:


Received: (at 27666) by debbugs.gnu.org; 20 Jul 2017 09:03:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 20 05:03:24 2017
Received: from localhost ([127.0.0.1]:48545 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dY7Mh-00009I-G5
	for submit <at> debbugs.gnu.org; Thu, 20 Jul 2017 05:03:23 -0400
Received: from mx2.cnes.fr ([194.199.174.201]:54153)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <John.Moyard@HIDDEN>) id 1dY7Me-00008z-Hn
 for 27666 <at> debbugs.gnu.org; Thu, 20 Jul 2017 05:03:21 -0400
X-IronPort-AV: E=Sophos;i="5.40,383,1496102400"; d="scan'208";a="12387590"
X-IPAS-Result: A2H5AABncXBZ/wIBeApcDggEAQEBAQIBAQEBCAEBAQGDLS1UEIEUB44EkWaWBYIICSELhRsCGoNYPxgBAgEBAQEBAQEDaCiFGAEBAQECAQEiEUoLAgEFAw0LAgIGHQMCAgImChQBEAEBBAESCIofCBCxDYImIop+AQEBAQEBBAEBAQEBAQEBGwWBC4IdhS6DJIRsgxEwghIfBZ8+eYZShlqGY4pahmxIlRYfOYEKMSEnhWoDHIEoP0A2AYhrAYENAQEB
From: Moyard John <John.Moyard@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>, Eric Blake <eblake@HIDDEN>,
 "27666 <at> debbugs.gnu.org" <27666 <at> debbugs.gnu.org>
Subject: RE: bug#27666: [grep on GPFS filesystem] SEEK_HOLE problem
Thread-Topic: bug#27666: [grep on GPFS filesystem] SEEK_HOLE problem
Thread-Index: AdL672Gj3XMSJY9wT4K0JNqME3kjtQAGIUAAACvAgGAAFEOmgAEdIiPWAC4b1QA=
Date: Thu, 20 Jul 2017 09:03:11 +0000
Message-ID: <4A209E6EBA46214D892C9CB9FDE889878D521D84@HIDDEN>
References: <4A209E6EBA46214D892C9CB9FDE889878D521203@HIDDEN>
 <b8d18def-22b7-b0f9-fc0f-74d39e23ba85@HIDDEN>
 <4A209E6EBA46214D892C9CB9FDE889878D52147C@HIDDEN>
 <79e0328a-2909-1389-6181-c403126161e0@HIDDEN>
 <4A209E6EBA46214D892C9CB9FDE889878D52198B@HIDDEN>
 <105b368a-9905-caf6-f3bf-a1eb320478e3@HIDDEN>
In-Reply-To: <105b368a-9905-caf6-f3bf-a1eb320478e3@HIDDEN>
Accept-Language: fr-FR, en-US
Content-Language: fr-FR
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-tm-as-product-ver: SMEX-11.0.0.4255-8.100.1062-23206.006
x-tm-as-result: No--5.507700-8.000000-31
x-tm-as-user-approved-sender: No
x-tm-as-user-blocked-sender: No
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 27666
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

VGhhbmsgeW91ciB2ZXJ5IG11Y2ggZm9yIHlvdXIgZGV0YWlsZWQgYW5zd2VyLg0KImNsb3NlKDIp
IiBpcyBpbnZvbHZlZCBiZWNhdXNlIGEgdGVzdCBjYXNlIG1hZGUgdG8gcmVwcm9kdWNlIHRoZSBw
cm9ibGVtIHVzZSBhIGNwLCBpbml0aWFsbHkgYSBmb3J0cmFuIGNvZGUgdG8gbWFrZSBhIGNvcHks
IGZvbGxvdyBieSBhIGdyZXAuDQoNCkkgY2xlYXJseSB1bmRlcnN0YW5kIHlvdXIgcG9pbnQgb2Yg
dmlldyBhYm91dCANCiAgICAgcmVwb3J0aW5nIGhvbGUgYW5kIE5VTCBieXRlcw0KICAgICBHUEZT
IGluY29tcGF0aWJpbGl0eSB3aXRoIG90aGVycyBwcm9ncmFtcy9jb21tYW5kcyB0aGF0IGNvdWxk
IHVzZSBTRUVLX0hPTEUNCkk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seSwgaXQgc2hvdWxkIHNpbXBseSBoYXZlIGxzZWVrIHdpdGggU0VF
S19IT0xFIGdvIHRvIGVuZC1vZi1maWxlOyB0aGF0IHdpbGwgd29yayB3aXRoICdncmVwJyAoYWxi
ZWl0IG1vcmUgc2xvd2x5KSwgYW5kIGlzIHRoZSBkb2N1bWVudGVkIHdheSB0aGF0IFNFRUtfSE9M
RSBpcyBzdXBwb3NlZCB0byB3b3JrIG9uIGZpbGUgc3lzdGVtcyB0aGF0IGNhbm5vdCBzdXBwb3J0
IFNFRUtfSE9MRSBkaXJlY3RseS4NCg==




Information forwarded to bug-grep@HIDDEN:
bug#27666; Package grep. Full text available.

Message received at 27666 <at> debbugs.gnu.org:


Received: (at 27666) by debbugs.gnu.org; 19 Jul 2017 10:47:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 19 06:47:46 2017
Received: from localhost ([127.0.0.1]:47216 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dXmWA-0003ND-B2
	for submit <at> debbugs.gnu.org; Wed, 19 Jul 2017 06:47:46 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:33666)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1dXmW8-0003My-LO
 for 27666 <at> debbugs.gnu.org; Wed, 19 Jul 2017 06:47:45 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 56F3A1601E5;
 Wed, 19 Jul 2017 03:47:38 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id wsKsxe1EqplF; Wed, 19 Jul 2017 03:47:36 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8B773160193;
 Wed, 19 Jul 2017 03:47:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id m2P2ozwAkdlb; Wed, 19 Jul 2017 03:47:36 -0700 (PDT)
Received: from [192.168.1.9] (unknown [47.153.184.153])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 697BF1600A7;
 Wed, 19 Jul 2017 03:47:36 -0700 (PDT)
Subject: Re: bug#27666: [grep on GPFS filesystem] SEEK_HOLE problem
To: Moyard John <John.Moyard@HIDDEN>, Eric Blake <eblake@HIDDEN>,
 "27666 <at> debbugs.gnu.org" <27666 <at> debbugs.gnu.org>
References: <4A209E6EBA46214D892C9CB9FDE889878D521203@HIDDEN>
 <b8d18def-22b7-b0f9-fc0f-74d39e23ba85@HIDDEN>
 <4A209E6EBA46214D892C9CB9FDE889878D52147C@HIDDEN>
 <79e0328a-2909-1389-6181-c403126161e0@HIDDEN>
 <4A209E6EBA46214D892C9CB9FDE889878D52198B@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Message-ID: <105b368a-9905-caf6-f3bf-a1eb320478e3@HIDDEN>
Date: Wed, 19 Jul 2017 03:47:36 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <4A209E6EBA46214D892C9CB9FDE889878D52198B@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 27666
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Moyard John wrote:
> GPFS maintainers give me the answer including manpage close(2) : nothin=
g will be done.

Sorry, I don't follow (why is close(2) involved?).

Is your correspondence with the GPFS maintainers public? It sounds like t=
hey do=20
not understand the issue.

Anyway, as Eric said, GPFS is clearly buggy. True, a file system is not o=
bliged=20
to report holes. But if it reports a hole, the hole must contain NUL byte=
s.

> On the web, same problems has been identified  for ZFS or perhaps NFS v=
4 ? :
>   https://utcc.utoronto.ca/~cks/space/blog/linux/GrepBinaryFileReason
> https://github.com/zfsonlinux/zfs/issues/6050

These URLs talk about a ZFS-on-Linux bug that has been fixed, apparently.=
  Good.

> https://lists.gnu.org/archive/html/bug-grep/2012-07/msg00022.html

This is the inverse issue, which doesn't cause the problem you mentioned.

> I will not file a bug on each file system maintainers : I should obtain=
 the same answer.

I don't see why. Only GPFS has the problem, as far as we know. And this i=
s=20
probably just a communication problem with its developers.

> So, is-it possible for you to modify something about the way to test bi=
nary file ?

Programs other than 'grep' use SEEK_HOLE. Even if we changed 'grep' to st=
op=20
using SEEK_HOLE, the other programs would still be broken on GPFS. Plus, =
'grep'=20
would likely be slower everywhere, just to work around the bug on GPFS.

Really, GPFS needs to be fixed. If GPFS can't support SEEK_HOLE correctly=
, it=20
should simply have lseek with SEEK_HOLE go to end-of-file; that will work=
 with=20
'grep' (albeit more slowly), and is the documented way that SEEK_HOLE is=20
supposed to work on file systems that cannot support SEEK_HOLE directly.




Information forwarded to bug-grep@HIDDEN:
bug#27666; Package grep. Full text available.

Message received at 27666 <at> debbugs.gnu.org:


Received: (at 27666) by debbugs.gnu.org; 18 Jul 2017 11:30:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 18 07:30:53 2017
Received: from localhost ([127.0.0.1]:45399 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dXQiG-0006aG-Pz
	for submit <at> debbugs.gnu.org; Tue, 18 Jul 2017 07:30:53 -0400
Received: from mx1.redhat.com ([209.132.183.28]:50566)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eblake@HIDDEN>) id 1dXQiE-0006Sc-2I
 for 27666 <at> debbugs.gnu.org; Tue, 18 Jul 2017 07:30:46 -0400
Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com
 [10.5.11.16])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.redhat.com (Postfix) with ESMTPS id 14004C0587FE;
 Tue, 18 Jul 2017 11:30:40 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 14004C0587FE
Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com;
 dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com;
 spf=pass smtp.mailfrom=eblake@HIDDEN
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 14004C0587FE
Received: from [10.10.120.160] (ovpn-120-160.rdu2.redhat.com [10.10.120.160])
 by smtp.corp.redhat.com (Postfix) with ESMTP id 6FBDE18019;
 Tue, 18 Jul 2017 11:30:38 +0000 (UTC)
Subject: Re: bug#27666: [grep on GPFS filesystem] SEEK_HOLE problem
To: Moyard John <John.Moyard@HIDDEN>, Paul Eggert <eggert@HIDDEN>,
 "27666 <at> debbugs.gnu.org" <27666 <at> debbugs.gnu.org>
References: <4A209E6EBA46214D892C9CB9FDE889878D521203@HIDDEN>
 <b8d18def-22b7-b0f9-fc0f-74d39e23ba85@HIDDEN>
 <4A209E6EBA46214D892C9CB9FDE889878D52147C@HIDDEN>
 <79e0328a-2909-1389-6181-c403126161e0@HIDDEN>
 <4A209E6EBA46214D892C9CB9FDE889878D52198B@HIDDEN>
From: Eric Blake <eblake@HIDDEN>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
Organization: Red Hat, Inc.
Message-ID: <2fc66202-83bb-e4a9-5f2b-60c0d65e917f@HIDDEN>
Date: Tue, 18 Jul 2017 06:30:37 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <4A209E6EBA46214D892C9CB9FDE889878D52198B@HIDDEN>
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="fs4arP7Am77fqMsTgqm6ilxsebbGiFH4S"
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
 (mx1.redhat.com [10.5.110.32]); Tue, 18 Jul 2017 11:30:40 +0000 (UTC)
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 27666
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--fs4arP7Am77fqMsTgqm6ilxsebbGiFH4S
Content-Type: multipart/mixed; boundary="FTrN8Nh9bnGdCuVQdu1mF24M5HWJnT1w0";
 protected-headers="v1"
From: Eric Blake <eblake@HIDDEN>
To: Moyard John <John.Moyard@HIDDEN>, Paul Eggert <eggert@HIDDEN>,
 "27666 <at> debbugs.gnu.org" <27666 <at> debbugs.gnu.org>
Message-ID: <2fc66202-83bb-e4a9-5f2b-60c0d65e917f@HIDDEN>
Subject: Re: bug#27666: [grep on GPFS filesystem] SEEK_HOLE problem
References: <4A209E6EBA46214D892C9CB9FDE889878D521203@HIDDEN>
 <b8d18def-22b7-b0f9-fc0f-74d39e23ba85@HIDDEN>
 <4A209E6EBA46214D892C9CB9FDE889878D52147C@HIDDEN>
 <79e0328a-2909-1389-6181-c403126161e0@HIDDEN>
 <4A209E6EBA46214D892C9CB9FDE889878D52198B@HIDDEN>
In-Reply-To: <4A209E6EBA46214D892C9CB9FDE889878D52198B@HIDDEN>

--FTrN8Nh9bnGdCuVQdu1mF24M5HWJnT1w0
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 07/18/2017 06:23 AM, Moyard John wrote:
> GPFS maintainers give me the answer including manpage close(2) : nothin=
g will be done.
> On the web, same problems has been identified  for ZFS or perhaps NFS v=
4 ? :
>  https://utcc.utoronto.ca/~cks/space/blog/linux/GrepBinaryFileReason
> https://github.com/zfsonlinux/zfs/issues/6050
> https://lists.gnu.org/archive/html/bug-grep/2012-07/msg00022.html
> I will not file a bug on each file system maintainers : I should obtain=
 the same answer.
> Or perhaps I will obtain an extract of manpage lseek(2), i.e. http://ma=
n7.org/linux/man-pages/man2/lseek.2.html :
>      However, a filesystem is not obliged to report holes, so
>     these operations are not a guaranteed mechanism for mapping the
>     storage space actually allocated to a file
> It's not a bug in file system.

A file system is not obliged to report holes, but IS obliged to NOT
report holes if a read() on that range will not see zeroes.  I still
think GPFS has a bug.

--=20
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


--FTrN8Nh9bnGdCuVQdu1mF24M5HWJnT1w0--

--fs4arP7Am77fqMsTgqm6ilxsebbGiFH4S
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAllt8V0ACgkQp6FrSiUn
Q2oUzAf/V1e+AUrUatUv1m90Bf3yjvc362aqLdoxML/gxGzybgICli2MrqrtQ56E
BH86tFviWxqgRMgmwioKkTk7AIaz2AOsKfvOeSBVOfKlWaehU24AAV+92EdIDytt
RyIO/xzPJTRDBkMtxXySsFEitWJB6heKKSt6RMERV5oO1VJxJZH756kHEWGAtgfw
HZyZYYFdRVVtdB9ZPWj4uOVOhMY7jO6apdZ5uW6fVD5KrYk+HBI8b1bK/l6JRaQA
bD7Pnflt73jSuxm2nB7HWaoF9WPZS8v/3M5lqjgCKDf9SBs+CXLgq5GJIsPn+Qhb
DMc0zyDaqfbO0BEaCvs8WLXP6gYx5Q==
=piyk
-----END PGP SIGNATURE-----

--fs4arP7Am77fqMsTgqm6ilxsebbGiFH4S--




Information forwarded to bug-grep@HIDDEN:
bug#27666; Package grep. Full text available.

Message received at 27666 <at> debbugs.gnu.org:


Received: (at 27666) by debbugs.gnu.org; 18 Jul 2017 11:23:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 18 07:23:36 2017
Received: from localhost ([127.0.0.1]:45394 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dXQbH-0005iB-Tu
	for submit <at> debbugs.gnu.org; Tue, 18 Jul 2017 07:23:36 -0400
Received: from mx1.cnes.fr ([194.199.174.200]:62021)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <John.Moyard@HIDDEN>) id 1dXQbG-0005hx-Di
 for 27666 <at> debbugs.gnu.org; Tue, 18 Jul 2017 07:23:35 -0400
X-IronPort-AV: E=Sophos;i="5.40,377,1496102400"; d="scan'208";a="12722152"
X-IPAS-Result: A2GUAgAx721Z/wEBeApTCg4IBAEBAQECAQEBAQgBAQEBg1pUEIEUB59olgSCBQwhC4UbAhqDN0AXAQIBAQEBAQEBA2gohRgBAQEBAwEiEVUCAQUDDQsCAgYdAwICAiYKFAEQAQEEARIIiicQrj+CJiKKaQEBAQEBAQEDAQEBAQEBAQEggQuCHYUugySEQhQWFYJ8MIISHwWfNHmGUYZXhmOBdYhihmpIlQ8hAjWBCjEhJ4MxhAA/QDYBhhmBMQGBDAEBAQ
From: Moyard John <John.Moyard@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>, Eric Blake <eblake@HIDDEN>,
 "27666 <at> debbugs.gnu.org" <27666 <at> debbugs.gnu.org>
Subject: RE: bug#27666: [grep on GPFS filesystem] SEEK_HOLE problem
Thread-Topic: bug#27666: [grep on GPFS filesystem] SEEK_HOLE problem
Thread-Index: AdL672Gj3XMSJY9wT4K0JNqME3kjtQAGIUAAACvAgGAAFEOmgADorimQ
Date: Tue, 18 Jul 2017 11:23:24 +0000
Message-ID: <4A209E6EBA46214D892C9CB9FDE889878D52198B@HIDDEN>
References: <4A209E6EBA46214D892C9CB9FDE889878D521203@HIDDEN>
 <b8d18def-22b7-b0f9-fc0f-74d39e23ba85@HIDDEN>
 <4A209E6EBA46214D892C9CB9FDE889878D52147C@HIDDEN>
 <79e0328a-2909-1389-6181-c403126161e0@HIDDEN>
In-Reply-To: <79e0328a-2909-1389-6181-c403126161e0@HIDDEN>
Accept-Language: fr-FR, en-US
Content-Language: fr-FR
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-tm-as-product-ver: SMEX-11.0.0.4255-8.100.1062-23202.006
x-tm-as-result: No--3.205800-8.000000-31
x-tm-as-user-approved-sender: No
x-tm-as-user-blocked-sender: No
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 27666
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

R1BGUyBtYWludGFpbmVycyBnaXZlIG1lIHRoZSBhbnN3ZXIgaW5jbHVkaW5nIG1hbnBhZ2UgY2xv
c2UoMikgOiBub3RoaW5nIHdpbGwgYmUgZG9uZS4NCk9uIHRoZSB3ZWIsIHNhbWUgcHJvYmxlbXMg
aGFzIGJlZW4gaWRlbnRpZmllZCAgZm9yIFpGUyBvciBwZXJoYXBzIE5GUyB2NCA/IDoN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6nCoDogamV1ZGkgMTMganVpbGxldCAy
MDE3IDIyOjQ0DQrDgMKgOiBNb3lhcmQgSm9objsgRXJpYyBCbGFrZTsgMjc2NjZAZGViYnVncy5n
bnUub3JnDQpPYmpldMKgOiBSZTogYnVnIzI3NjY2OiBbZ3JlcCBvbiBHUEZTIGZpbGVzeXN0ZW1d
IFNFRUtfSE9MRSBwcm9ibGVtDQoNCk9uIDA3LzEzLzIwMTcgMDI6MTMgQU0sIE1veWFyZCBKb2hu
IHdyb3RlOg0KPiBUaGF0J3Mgd2h5IEkgd2FzIGFza2luZyBhYm91dCBhbm90aGVyIHdheSB0byBp
ZGVudGlmeSBhIGJpbmFyeSBmaWxlIGluc3RlYWQgdXNpbmcgJ3NlZWsoU0VFS19IT0xFKScgOiBk
byB5b3UgdGhpbmsgdGhhdCBpdCBjb3VsZCBwb3NzaWJsZT8NCg0KSWYgdGhlcmUgaXMgYSByZWFz
b25hYmxlIChpLmUuLCBjaGVhcCkgd2F5IGZvciBncmVwIHRvIGRldGVybWluZSB0aGF0IFNFRUtf
SE9MRSBpcyBidWdneSBmb3IgdGhlIGN1cnJlbnQgZmlsZSwgSSBzdXBwb3NlIGdyZXAgY291bGQg
ZG8gdGhhdC4gDQpEbyB5b3Uga25vdyBvZiBhbnkgc3VjaCBtZXRob2Q/DQoNClJlYWxseSwgdGhl
IGJ1ZyBoZXJlIGlzIGluIHRoZSBmaWxlIHN5c3RlbSwgbm90IGluIGdyZXAuIEhhdmUgeW91IGZp
bGVkIGEgYnVnIHdpdGggdGhlIEdQRlMgbWFpbnRhaW5lcnM/DQoNCg==




Information forwarded to bug-grep@HIDDEN:
bug#27666; Package grep. Full text available.

Message received at 27666 <at> debbugs.gnu.org:


Received: (at 27666) by debbugs.gnu.org; 13 Jul 2017 20:43:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 13 16:43:59 2017
Received: from localhost ([127.0.0.1]:37414 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dVkxq-000421-RB
	for submit <at> debbugs.gnu.org; Thu, 13 Jul 2017 16:43:58 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:40284)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1dVkxp-00041n-2z
 for 27666 <at> debbugs.gnu.org; Thu, 13 Jul 2017 16:43:57 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8B4001600F4;
 Thu, 13 Jul 2017 13:43:50 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id 1qrTXuR5GWeg; Thu, 13 Jul 2017 13:43:49 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id DCD5B160183;
 Thu, 13 Jul 2017 13:43:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id iJd-OSiXjuew; Thu, 13 Jul 2017 13:43:49 -0700 (PDT)
Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C52871600F4;
 Thu, 13 Jul 2017 13:43:49 -0700 (PDT)
Subject: Re: bug#27666: [grep on GPFS filesystem] SEEK_HOLE problem
To: Moyard John <John.Moyard@HIDDEN>, Eric Blake <eblake@HIDDEN>,
 "27666 <at> debbugs.gnu.org" <27666 <at> debbugs.gnu.org>
References: <4A209E6EBA46214D892C9CB9FDE889878D521203@HIDDEN>
 <b8d18def-22b7-b0f9-fc0f-74d39e23ba85@HIDDEN>
 <4A209E6EBA46214D892C9CB9FDE889878D52147C@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Message-ID: <79e0328a-2909-1389-6181-c403126161e0@HIDDEN>
Date: Thu, 13 Jul 2017 13:43:49 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <4A209E6EBA46214D892C9CB9FDE889878D52147C@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Content-Language: en-US
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 27666
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

On 07/13/2017 02:13 AM, Moyard John wrote:
> That's why I was asking about another way to identify a binary file instead using 'seek(SEEK_HOLE)' : do you think that it could possible?

If there is a reasonable (i.e., cheap) way for grep to determine that 
SEEK_HOLE is buggy for the current file, I suppose grep could do that. 
Do you know of any such method?

Really, the bug here is in the file system, not in grep. Have you filed 
a bug with the GPFS maintainers?





Information forwarded to bug-grep@HIDDEN:
bug#27666; Package grep. Full text available.

Message received at 27666 <at> debbugs.gnu.org:


Received: (at 27666) by debbugs.gnu.org; 13 Jul 2017 09:13:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 13 05:13:51 2017
Received: from localhost ([127.0.0.1]:36275 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dVaBz-0000oR-FJ
	for submit <at> debbugs.gnu.org; Thu, 13 Jul 2017 05:13:51 -0400
Received: from mx1.cnes.fr ([194.199.174.200]:36141)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <John.Moyard@HIDDEN>) id 1dVaBx-0000oD-7w
 for 27666 <at> debbugs.gnu.org; Thu, 13 Jul 2017 05:13:49 -0400
X-IronPort-AV: E=Sophos;i="5.40,353,1496102400"; d="scan'208";a="12640208"
X-IPAS-Result: A2E0BAB+OGdZ/wEBeApTBwMaAQEBAQIBAQEBCAEBAQGDWlQQgRQHn3V0gRsBk3OCESSCF4M7AhqDR0EWAQIBAQEBAQEBA2gohRgBAQEBAgEjEUoLAgEFAw0BCgICBh0DAgICMBQBEAEBBAESCBOKDAivA4ImIosAAQEBAQEBBAEBAQEBAQEBIIELgh2FLoJwNIRCKhUKJoJMMIISHwWfLXmGUY03gR5XiF0MhlxIlQ0mBC4/SzEhJ4VqAxyBZ0A2iAABgQwBAQE
From: Moyard John <John.Moyard@HIDDEN>
To: Eric Blake <eblake@HIDDEN>, "27666 <at> debbugs.gnu.org"
 <27666 <at> debbugs.gnu.org>
Subject: RE: bug#27666: [grep on GPFS filesystem] SEEK_HOLE problem
Thread-Topic: bug#27666: [grep on GPFS filesystem] SEEK_HOLE problem
Thread-Index: AdL672Gj3XMSJY9wT4K0JNqME3kjtQAGIUAAACvAgGA=
Date: Thu, 13 Jul 2017 09:13:37 +0000
Message-ID: <4A209E6EBA46214D892C9CB9FDE889878D52147C@HIDDEN>
References: <4A209E6EBA46214D892C9CB9FDE889878D521203@HIDDEN>
 <b8d18def-22b7-b0f9-fc0f-74d39e23ba85@HIDDEN>
In-Reply-To: <b8d18def-22b7-b0f9-fc0f-74d39e23ba85@HIDDEN>
Accept-Language: fr-FR, en-US
Content-Language: fr-FR
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-tm-as-product-ver: SMEX-11.0.0.4255-8.100.1062-23192.005
x-tm-as-result: No--13.753000-8.000000-31
x-tm-as-user-approved-sender: No
x-tm-as-user-blocked-sender: No
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 27666
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

SGksDQoNCkkgZm9yZ290IHRvIHByZWNpc2UgdGhhdCBhY3RpdmF0ZSAgJy0tYmluYXJ5LWZpbGVz
PXRleHQnICBncmVwIG9wdGlvbiBvciBpbnRlZ3JhdGUgYSBzeW5jaHJvbml6YXRpb24gc3RlcCBi
ZWZvcmUgYSBncmVwIGFyZSBub3QgbGFzdGluZyBzb2x1dGlvbnMgaW4gYWxsIG15IHNoZWxsIHNj
cmlwdHMuDQpU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HNlZWsoU0VFS19IT0xF
KSByZXR1cm5zIGEgbWlkLWZpbGUgb2Zmc2V0IHdoZW4gdGhlIGZpbGUgaXMgZmlyc3QgY3JlYXRl
ZCwgYnV0IG5vdCBsYXRlciBhZnRlciB0aGUgZmlsZSBoYXMgYmVlbiBzeW5jZWQsIHRoZW4gdGhh
dCBpcyBhIGJ1ZyBpbiB0aGUgZmlsZXN5c3RlbSB3aGljaCBzaG91bGQgYmUgcmVwb3J0ZWQgdG8g
dGhlIGFwcHJvcHJpYXRlIGZpbGVzeXN0ZW0va2VybmVsIGZvbGtzLiAgU0VFS19IT0xFIGlzIG9u
bHkgYWxsb3dlZCB0byByZXR1cm4gYSBtaWQtZmlsZSBvZmZzZXQgaWYgcmVhZGluZyB0aGUgZmls
ZSBhdCB0aGF0IHBvaW50IGluIHRpbWUgd291bGQgcmVhZCBOVUwgYnl0ZXMsIGFuZCBOVUwgYnl0
ZXMgYXJlIGluZGVlZCBiaW5hcnkgZGF0YS4NCg0KPiBJdCBjb3VsZCB0YWtlIHNldmVyYWwgc2Vj
b25kcyB0byBzYXZlIHRoZSBlbnRpcmUgZmlsZSBvbiB0aGUgZGlzay4NCg0KRG9lcyBydW5uaW5n
ICdzeW5jJyBwcmlvciB0byBncmVwIHNvbHZlIHRoZSBwcm9ibGVtPw0KDQotLQ0KRXJpYyBCbGFr
ZSwgUHJpbmNpcGFsIFNvZnR3YXJlIEVuZ2luZWVyDQpSZWQgSGF0LCBJbmMuICAgICAgICAgICAr
MS05MTktMzAxLTMyNjYNClZpcnR1YWxpemF0aW9uOiAgcWVtdS5vcmcgfCBsaWJ2aXJ0Lm9yZw0K
DQo=




Information forwarded to bug-grep@HIDDEN:
bug#27666; Package grep. Full text available.

Message received at 27666 <at> debbugs.gnu.org:


Received: (at 27666) by debbugs.gnu.org; 12 Jul 2017 14:22:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 12 10:22:46 2017
Received: from localhost ([127.0.0.1]:35468 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dVIXO-0003Ry-4Y
	for submit <at> debbugs.gnu.org; Wed, 12 Jul 2017 10:22:46 -0400
Received: from mx2.cnes.fr ([194.199.174.201]:41490)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <John.Moyard@HIDDEN>) id 1dVIWb-0003QF-PX
 for 27666 <at> debbugs.gnu.org; Wed, 12 Jul 2017 10:21:58 -0400
X-IronPort-AV: E=Sophos;i="5.40,350,1496102400"; d="scan'208";a="12252026"
X-IPAS-Result: A2E7BADLL2ZZ/wUBeApZAxoBAQEBAgEBAQEIAQEBAYNaZIEUB59ydIEbAZNzghEkgheDOwIagzRAFwECAQEBAQEBAQNoKIUYAQEBAQIBIxFKCwIBBQMNAQoCAgYdAwICAjAUARABAQQBEggTigwIrRSCJiKLAAEBAQEBAQQBAQEBAQEBASCBC4IdhS6CcDSEbBUKJoJMMIISHwWfKHmGT401gR5XiFoMhlxIlQkgATc/SzEhJ4VqAxyBZ0A2h0wBgQwBAQE
From: Moyard John <John.Moyard@HIDDEN>
To: Eric Blake <eblake@HIDDEN>, "27666 <at> debbugs.gnu.org"
 <27666 <at> debbugs.gnu.org>
Subject: RE: bug#27666: [grep on GPFS filesystem] SEEK_HOLE problem
Thread-Topic: bug#27666: [grep on GPFS filesystem] SEEK_HOLE problem
Thread-Index: AdL672Gj3XMSJY9wT4K0JNqME3kjtQAGIUAAAARdijA=
Date: Wed, 12 Jul 2017 14:21:50 +0000
Message-ID: <4A209E6EBA46214D892C9CB9FDE889878D5212A3@HIDDEN>
References: <4A209E6EBA46214D892C9CB9FDE889878D521203@HIDDEN>
 <b8d18def-22b7-b0f9-fc0f-74d39e23ba85@HIDDEN>
In-Reply-To: <b8d18def-22b7-b0f9-fc0f-74d39e23ba85@HIDDEN>
Accept-Language: fr-FR, en-US
Content-Language: fr-FR
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-tm-as-product-ver: SMEX-11.0.0.4255-8.100.1062-23190.006
x-tm-as-result: No--19.333200-8.000000-31
x-tm-as-user-approved-sender: No
x-tm-as-user-blocked-sender: No
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 27666
X-Mailman-Approved-At: Wed, 12 Jul 2017 10:22:45 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

SGksDQoNClRoaXMgaXMgdGhlIGtpbmQgb2YgYW5zd2VyIG9idGFpbmVkIGZyb20gdGhlIGRldmVs
b3BtZW50IGZpbGUgc3lzdGVtIHRlYW0gOg0KLS0tDQooY2xvc2UoMikgbWFucGFnZSByZWZlcmVu
Y2UpDQpBIHN1Y2Nlc3NmdWwgY2xvc2UgZG9lcyBub3QgZ3VhcmFudGVlIHRoYXQgdGhlIGRhdGEg
aGFzIGJlZW4gc3VjY2Vzc2Z1bGx5IHNhdmVkIHRvIGRpc2ssIGFzIHRoZSBrZXJuZWwgZGVmZXJz
IHdyaXRlcy4gIEl0IGlzIG5vdCB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WwgU29mdHdh
cmUgRW5naW5lZXINClJlZCBIYXQsIEluYy4gICAgICAgICAgICsxLTkxOS0zMDEtMzI2Ng0KVmly
dHVhbGl6YXRpb246ICBxZW11Lm9yZyB8IGxpYnZpcnQub3JnDQoNCg==




Information forwarded to bug-grep@HIDDEN:
bug#27666; Package grep. Full text available.

Message received at 27666 <at> debbugs.gnu.org:


Received: (at 27666) by debbugs.gnu.org; 12 Jul 2017 14:11:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 12 10:11:00 2017
Received: from localhost ([127.0.0.1]:35426 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dVIM0-000373-9a
	for submit <at> debbugs.gnu.org; Wed, 12 Jul 2017 10:11:00 -0400
Received: from mx1.redhat.com ([209.132.183.28]:45538)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eblake@HIDDEN>) id 1dVILy-00036p-Fx
 for 27666 <at> debbugs.gnu.org; Wed, 12 Jul 2017 10:10:59 -0400
Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com
 [10.5.11.16])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.redhat.com (Postfix) with ESMTPS id 6AB557CE0C;
 Wed, 12 Jul 2017 14:10:52 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6AB557CE0C
Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com;
 dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com;
 spf=pass smtp.mailfrom=eblake@HIDDEN
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6AB557CE0C
Received: from [10.10.121.60] (ovpn-121-60.rdu2.redhat.com [10.10.121.60])
 by smtp.corp.redhat.com (Postfix) with ESMTP id 059E84D746;
 Wed, 12 Jul 2017 14:10:51 +0000 (UTC)
Subject: Re: bug#27666: [grep on GPFS filesystem] SEEK_HOLE problem
To: Moyard John <John.Moyard@HIDDEN>, 27666 <at> debbugs.gnu.org
References: <4A209E6EBA46214D892C9CB9FDE889878D521203@HIDDEN>
From: Eric Blake <eblake@HIDDEN>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
Organization: Red Hat, Inc.
Message-ID: <b8d18def-22b7-b0f9-fc0f-74d39e23ba85@HIDDEN>
Date: Wed, 12 Jul 2017 09:10:50 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <4A209E6EBA46214D892C9CB9FDE889878D521203@HIDDEN>
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="bgT2fIa4IGj3h7wEnFiqaIoREiNWUmrAS"
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
 (mx1.redhat.com [10.5.110.28]); Wed, 12 Jul 2017 14:10:52 +0000 (UTC)
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 27666
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--bgT2fIa4IGj3h7wEnFiqaIoREiNWUmrAS
Content-Type: multipart/mixed; boundary="3LjbJdwJDeW11OdE5f4lIF0M4qbXvDe76";
 protected-headers="v1"
From: Eric Blake <eblake@HIDDEN>
To: Moyard John <John.Moyard@HIDDEN>, 27666 <at> debbugs.gnu.org
Message-ID: <b8d18def-22b7-b0f9-fc0f-74d39e23ba85@HIDDEN>
Subject: Re: bug#27666: [grep on GPFS filesystem] SEEK_HOLE problem
References: <4A209E6EBA46214D892C9CB9FDE889878D521203@HIDDEN>
In-Reply-To: <4A209E6EBA46214D892C9CB9FDE889878D521203@HIDDEN>

--3LjbJdwJDeW11OdE5f4lIF0M4qbXvDe76
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 07/12/2017 04:27 AM, Moyard John wrote:
> Hi,
>=20
> I use GPFS file system and I have sometimes an issue using grep command=
=2E
> When issue occurs with the following message "Binary file <myfile> matc=
hes"
> But "<myfile>" is an ASCII one, not a binary file.
> The problem seems to deals with lseek(SEEK_HOLE) command and a file not=
 completely flushed after close.

If lseek(SEEK_HOLE) returns a mid-file offset when the file is first
created, but not later after the file has been synced, then that is a
bug in the filesystem which should be reported to the appropriate
filesystem/kernel folks.  SEEK_HOLE is only allowed to return a mid-file
offset if reading the file at that point in time would read NUL bytes,
and NUL bytes are indeed binary data.

> It could take several seconds to save the entire file on the disk.

Does running 'sync' prior to grep solve the problem?

--=20
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


--3LjbJdwJDeW11OdE5f4lIF0M4qbXvDe76--

--bgT2fIa4IGj3h7wEnFiqaIoREiNWUmrAS
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJZZi3rAAoJEKeha0olJ0Nq8uAH/3N9c7LzwfxLGPYujUvcRvtZ
ck5a3ETg2gnabx2vLo3vLiGpcVpWN25bfIxueQ4eFDPmihvmGoIxktzw4S/LzsEE
Mv0O/k39VltxJQPkshLJzD5T5ZLBOXOGs/ZBRVjCu2qjohmdT86bbQmOZ/OaQslQ
/+C2TaPxBNj1+2rse6bZRFSXa/mzpCf2e1or6mQ6PMmPtkiMXfImoOVWUWFWqVft
qgBUtdmCku1Yndp1HAG7rmdYggUI40Omt2BMB3vBBPW10v+SngwKc5TdSdsCRX4f
lA3rqd2Z+5bq/XuNR5ScoNjamRMo4SMysHpHAu0/dKNxpJAJsVy+479gYGsFiFo=
=1t+q
-----END PGP SIGNATURE-----

--bgT2fIa4IGj3h7wEnFiqaIoREiNWUmrAS--




Information forwarded to bug-grep@HIDDEN:
bug#27666; Package grep. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Jul 2017 11:57:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 12 07:57:24 2017
Received: from localhost ([127.0.0.1]:34794 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dVGGg-00089p-6H
	for submit <at> debbugs.gnu.org; Wed, 12 Jul 2017 07:57:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48662)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <John.Moyard@HIDDEN>) id 1dVDwD-00012A-Rf
 for submit <at> debbugs.gnu.org; Wed, 12 Jul 2017 05:28:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <John.Moyard@HIDDEN>) id 1dVDw7-0004M1-GR
 for submit <at> debbugs.gnu.org; Wed, 12 Jul 2017 05:28:00 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,HTML_MESSAGE
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:47497)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <John.Moyard@HIDDEN>) id 1dVDw7-0004Lu-Cw
 for submit <at> debbugs.gnu.org; Wed, 12 Jul 2017 05:27:59 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:39620)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <John.Moyard@HIDDEN>) id 1dVDw5-0006v9-UF
 for bug-grep@HIDDEN; Wed, 12 Jul 2017 05:27:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <John.Moyard@HIDDEN>) id 1dVDw2-0004IQ-KE
 for bug-grep@HIDDEN; Wed, 12 Jul 2017 05:27:57 -0400
Received: from mx2.cnes.fr ([194.199.174.201]:55785)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <John.Moyard@HIDDEN>) id 1dVDw2-0004Hb-Cd
 for bug-grep@HIDDEN; Wed, 12 Jul 2017 05:27:54 -0400
X-IronPort-AV: E=Sophos;i="5.40,349,1496102400"; d="scan'208,217";a="12243517"
X-IPAS-Result: A2HPBAAo6mVZ/wUBeApdHQEFAQsBgm9rVIErjnShVIc9HIVaAoNFQxQBAgEBAQEBAQEDaB0LhUxeAQUHAQgVViYBBBuJQ2SuViKLAAExgyiFLogQg0GCEh8Fnyh5lASKT4ZoSJUFNiI/SzEhJ4dwQIdXAYEMAQEB
From: Moyard John <John.Moyard@HIDDEN>
To: "bug-grep@HIDDEN" <bug-grep@HIDDEN>
Subject: [grep on GPFS filesystem] SEEK_HOLE problem
Thread-Topic: [grep on GPFS filesystem] SEEK_HOLE problem
Thread-Index: AdL672Gj3XMSJY9wT4K0JNqME3kjtQ==
Date: Wed, 12 Jul 2017 09:27:50 +0000
Message-ID: <4A209E6EBA46214D892C9CB9FDE889878D521203@HIDDEN>
Accept-Language: fr-FR, en-US
Content-Language: fr-FR
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-tm-as-product-ver: SMEX-11.0.0.4255-8.100.1062-23190.005
x-tm-as-result: No--0.549700-8.000000-31
x-tm-as-user-approved-sender: No
x-tm-as-user-blocked-sender: No
Content-Type: multipart/alternative;
 boundary="_000_4A209E6EBA46214D892C9CB9FDE889878D521203TWMBXP03cnesnet_"
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 12 Jul 2017 07:57:20 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.1 (----)

--_000_4A209E6EBA46214D892C9CB9FDE889878D521203TWMBXP03cnesnet_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,

I use GPFS file system and I have sometimes an issue using grep command.
When issue occurs with the following message "Binary file <myfile> matches"
But "<myfile>" is an ASCII one, not a binary file.
The problem seems to deals with lseek(SEEK_HOLE) command and a file not com=
pletely flushed after close.
It could take several seconds to save the entire file on the disk.

So could grep command have another way to determine if input file is binary=
/ASCII instead using lseek(SEEK_HOLE) ?

Best regards
john



--_000_4A209E6EBA46214D892C9CB9FDE889878D521203TWMBXP03cnesnet_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left:=
 #800000 2px solid; } --></style>
</head>
<body>
<font face=3D"Calibri" size=3D"2"><span style=3D"font-size:11pt;">
<div>Hi,</div>
<div>&nbsp;</div>
<div>I use GPFS file system and I have sometimes an issue using grep comman=
d.</div>
<div>When issue occurs with the following message &#8220;<font color=3D"#1F=
497D"><i>Binary file </i></font><font color=3D"#1F497D"><i>&lt;myfile&gt;</=
i></font><font color=3D"#1F497D"><i> matches</i></font><font color=3D"#1F49=
7D"><i>&#8221;</i></font></div>
<div>But &#8220;&lt;myfile&gt;&#8221; is an ASCII one, not a binary file.</=
div>
<div>The problem seems to deals with <i>lseek(SEEK_HO</i><i>LE)</i> command=
 and a file not completely flushed after close.</div>
<div>It could take several seconds to save the entire file on the disk.</di=
v>
<div>&nbsp;</div>
<div>So could <i>grep</i> command have another way to determine if input fi=
le is binary/ASCII instead using <i>lseek</i><i>(</i><i>SEEK_HOLE)</i> ?</d=
iv>
<div>&nbsp;</div>
<div>Best regards</div>
<div>john</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
</span></font>
</body>
</html>

--_000_4A209E6EBA46214D892C9CB9FDE889878D521203TWMBXP03cnesnet_--




Acknowledgement sent to Moyard John <John.Moyard@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-grep@HIDDEN. Full text available.
Report forwarded to bug-grep@HIDDEN:
bug#27666; Package grep. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 20 Jul 2017 13:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.