New issue
Advanced search Search tips

Issue 911288 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Create file with append mode fails on crostini shared paths

Project Member Reported by joelhockey@chromium.org, Dec 3

Issue description

Originally reported in https://bugs.chromium.org/p/chromium/issues/detail?id=878324#c116

Creating a file with append mode fails for crostini shared paths using 9p server when the file does not exist.

Example:

rsync -rtogvO --progress \
  --log-file=/mnt/chromeos/MyFiles/Downloads/testfolder/testlog.txt \ 
  /home/<username>/testfolder/ \
  /mnt/chromeos/MyFiles/Downloads/testfolder/

rsync calls open with O_CREATE and O_APPEND.  Testing shows that it is the O_APPEND flag which causes the command to fail with EINVAL (22), and that it looks like the 9p client code which is failing.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/aad97046997dfe23ccd4ba760e59b860a3c6f10e

commit aad97046997dfe23ccd4ba760e59b860a3c6f10e
Author: Chirantan Ekbote <chirantan@chromium.org>
Date: Fri Dec 07 06:06:38 2018

vm_tools: p9: Don't set O_TRUNC unconditionally on create

The rust standard library doesn't like it if you set the truncate and
append options without setting the create_new option.  Since there is
already a dedicated 9p flag for truncate, check that instead of setting
it to true unconditionally.

BUG= chromium:911288 
TEST=call open(2) with (O_APPEND | O_CREAT | O_WRONLY) on a file that
     doesn't exist and see that it succeeds

Change-Id: I0bbca36302e91c691d31f02839ac1092b756a575
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1359777
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Stephen Barber <smbarber@chromium.org>

[modify] https://crrev.com/aad97046997dfe23ccd4ba760e59b860a3c6f10e/vm_tools/p9/src/server.rs

Owner: chirantan@chromium.org
Status: Fixed (was: Untriaged)

Sign in to add a comment