All of lore.kernel.org
 help / color / mirror / Atom feed
* output file not truncated
@ 2011-09-08  4:13 Henry C Chang
  2011-09-08  4:41 ` Sage Weil
  0 siblings, 1 reply; 3+ messages in thread
From: Henry C Chang @ 2011-09-08  4:13 UTC (permalink / raw)
  To: ceph-devel

Hi,

Finally got some time to play around ceph.
I found that: when I dumped osd status by: ceph osd dump -o
/tmp/dump.json --format=json, I got some garbage data in the end of
file.
Thus, I checked the code. I noticed that the output file was not
truncated in ceph_tool_cli_input:

  // Write to a file. Don't truncate the file.
  int fd = TEMP_FAILURE_RETRY(::open(outfile, O_WRONLY|O_CREAT|O_TRUNC, 0644));

Since it seems intended, I was wondering why. After all, in my case, I
found it causing problems.

Henry

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-08  4:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-08  4:13 output file not truncated Henry C Chang
2011-09-08  4:41 ` Sage Weil
2011-09-08  4:50   ` Henry C Chang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.