[Xapian-tickets] [Xapian] #651: Protect writable fds by setting filepos very high

Xapian nobody at xapian.org
Tue May 28 04:16:17 BST 2024


#651: Protect writable fds by setting filepos very high
---------------------------+-------------------------------
 Reporter:  Olly Betts     |             Owner:  Olly Betts
     Type:  enhancement    |            Status:  assigned
 Priority:  normal         |         Milestone:  2.0.0
Component:  Backend-Glass  |           Version:
 Severity:  normal         |        Resolution:
 Keywords:                 |        Blocked By:
 Blocking:                 |  Operating System:  All
---------------------------+-------------------------------
Comment (by Olly Betts):

 Tested NetBSD too.  An emerging pattern seems to be that on modern
 platforms we can lseek to the maximum possible `off_t` value, so trying to
 seek to that and not doing anything further seems a reasonable default
 approach.

 Linux is actually something of an oddity here in that it doesn't allow
 this for some FSes.  A notable FS which doesn't is ext4 which is widely
 used (I suspect it's still the most widely used FS on Linux) so adding a
 fallback to the ext4 value on Linux seems reasonable, and that is what
 I've already implemented.
-- 
Ticket URL: <https://trac.xapian.org/ticket/651#comment:19>
Xapian <https://xapian.org/>
Xapian


More information about the Xapian-tickets mailing list