Skip to contentSkip to conversation

fs: ext4 write: return file len on success

PATCH In review Przemyslaw Marczak 3 participants 4 messages Feb 17, 2015 – Mar 6, 2015 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: ext4 write: return file len on success

After rework of the file system API, the size of ext4 write was missed. This causes printing unreliable write size at the end of the file system write operation.

Cc Sjoerd Simons <[email protected]>
Cc Lukasz Majewski <[email protected]>
Cc Simon Glass <[email protected]>
---
 fs/ext4/ext4_write.c | 3 +++
 1 file changed, 3 insertions(+)
fs/ext4/ext4_write.c +3 -0
index f7c52cc..fbc4c4b 100644
@@ -1000,10 +1000,13 @@ int ext4_write_file(const char *filename, void *buf, loff_t offset,
 	}
 	ext4fs_close();
 
+	*actwrite = len;
+
 	return 0;
 
 fail:
 	ext4fs_close();
+	*actwrite = 0;
 
 	return -1;
 }
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 fs: ext4 write: return file len on success

Quoted 3 lines · Przemyslaw Marczak

After rework of the file system API, the size of ext4 write was missed. This causes printing unreliable write size at the end of the file system write operation.

This fixes the issue I mentioned in the DFU-related thread.

#2 lore raw

PATCH 1/1 fs: ext4 write: return file len on success

In reply to Przemyslaw Marczak

Hello,

Quoted 21 lines · Przemyslaw Marczak

After rework of the file system API, the size of ext4 write was missed. This causes printing unreliable write size at the end of the file system write operation.

Cc Sjoerd Simons <[email protected]>
Cc Lukasz Majewski <[email protected]>
Cc Simon Glass <[email protected]>
---
  fs/ext4/ext4_write.c | 3 +++
  1 file changed, 3 insertions(+)
fs/ext4/ext4_write.c +0 -0
index f7c52cc..fbc4c4b 100644
@@ -1000,10 +1000,13 @@ int ext4_write_file(const char *filename, void *buf, loff_t offset,
  	}
  	ext4fs_close();
 

fs/ext4/ext4_write.c int ext4_write_file(const char *filename, void *buf, loff_t offset, · line 1012

Quoted 10 lines
fs/ext4/ext4_write.c +3 -0
+	*actwrite = len;
+
  	return 0;
 
  fail:
  	ext4fs_close();
+	*actwrite = 0;
 
  	return -1;
  }

Tom, this patch is a fix for write command. Could you please, take it into the master? Then I will not resend it with other patch set, because it's actually independent.

Best regards,

Signature · 4 lines
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
#3 lore raw
In reply to Przemyslaw Marczak
Quoted 9 lines · Przemyslaw Marczak

After rework of the file system API, the size of ext4 write was missed. This causes printing unreliable write size at the end of the file system write operation.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/86d46c1e/attachment.sig>