Ticket #3928 (closed defect: wontfix)

Opened 6 years ago

Last modified 6 years ago

vfs_preallocate return 0 if fallocate not supported

Reported by: gray_-_wolf Owned by:
Priority: minor Milestone:
Component: mc-vfs Version: master
Keywords: Cc: wolf+mc@…
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description (last modified by andrew_b) (diff)

In lib/vfs/vfs.c int vfs_preallocate claims to return 0 on success and non-zero otherwise, therefore it should not 0 when fallocate is not even supported (that is hardly success...). Shouldn't it be -1?

Change History

comment:1 Changed 6 years ago by gray_-_wolf

  • Cc wolf+mc@… added

comment:2 Changed 6 years ago by andrew_b

  • Component changed from mc-core to mc-vfs
  • Description modified (diff)

comment:3 Changed 6 years ago by andrew_b

Returning not 0 if fallocate is not supported avoids the raise of message "Cannot preallocate space for target file". Perhaps, we should set the errno to ENOTSUPP.
Regardless of reason why vfs_preallocate() returns not 0, file copy starts anyway.

comment:4 Changed 6 years ago by andrew_b

  • Status changed from new to closed
  • Resolution set to wontfix
  • Milestone Future Releases deleted
Note: See TracTickets for help on using tickets.