Re: [PATCH] make f_pos accessible via /proc/PID/fd/N

Paul Jakma (paul@clubi.ie)
Tue, 11 Mar 2003 12:48:47 +0000 (GMT)


On Mon, 3 Mar 2003, Kenn Humborg wrote:

> The attached patch sets the "size" for the /proc/PID/fd/N entries
> to the current file position (file->f_pos).
>
> In proc_lookupfd(), I fill inode->i_size with file->f_pos. Then
> in pid_fd_revalidate(), I refresh it again.
>
> I would find this useful to be able to tell, for example, how far
> a large outgoing SMTP transfer has got (so I can avoid rebooting
> if it's almost finished), or how far a customer download from our
> FTP server has got to.

Cute little addition. This would be very useful to have.

> Was there any particular reason for fixing the "size" of these
> files at 64? Are there any tools that depend on this?

If not it'd be very nice to have in the kernel.

> Patch is against 2.5.63.
>
> Later,
> Kenn

regards,

-- 
Paul Jakma	paul@clubi.ie	paul@jakma.org	Key ID: 64A2FF6A
	warning: do not ever send email to spam@dishone.st
Fortune:
Numeric stability is probably not all that important when you're guessing.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/