Skip to contentSkip to conversation

Documentation: New truncate sequence: Remove reference to nonexistent ->setsize

PATCH In review Nikanth Karthikesan 2 participants 3 messages Jun 9, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Documentation: New truncate sequence: Remove reference to nonexistent ->setsize

The documentation refers to ->setsize which does not exist. Remove it.

---

Documentation/filesystems/vfs.txt +1 -2
index 94677e7..e8b1b27 100644
@@ -401,8 +401,7 @@ otherwise noted.
   	started might not be in the page cache at the end of the
   	walk).
 
-  truncate: Deprecated. This will not be called if ->setsize is defined.
-	Called by the VFS to change the size of a file.  The
+  truncate: Deprecated. Called by the VFS to change the size of a file. The
  	i_size field of the inode is set to the desired size by the
  	VFS before this method is called.  This method is called by
  	the truncate(2) system call and related functionality.
#1 lore raw

Documentation/filesystems/vfs.txt otherwise noted. · line 405

Quoted 4 lines · Nikanth Karthikesan
Documentation/filesystems/vfs.txt +1 -2
-  truncate: Deprecated. This will not be called if ->setsize is defined.
-	Called by the VFS to change the size of a file.  The
+  truncate: Deprecated. Called by the VFS to change the size of a file. The
  	i_size field of the inode is set to the desired size by the

I'd just remove the whole description - the deprecated should be enough.

#2 lore raw
Quoted 8 lines · On Wednesday 09 June 2010 15:30:16 Christoph Hellwig wrote:
Quoted 4 lines · Nikanth Karthikesan
Documentation/filesystems/vfs.txt +1 -2
-  truncate: Deprecated. This will not be called if ->setsize is defined.
-	Called by the VFS to change the size of a file.  The
+  truncate: Deprecated. Called by the VFS to change the size of a file.

The i_size field of the inode is set to the desired size by the

I'd just remove the whole description - the deprecated should be enough.

There is a note below the description, which should prevent new users.

        Note: ->truncate and vmtruncate are deprecated. Do not add new
        instances/calls of these. Filesystems should be converted to do their
        truncate sequence via ->setattr().

But leaving it as it is would help, people understand how the deprecated callback works. IMHO it could be left till all the users are converted.

Thanks
Nikanth