From: porte64@free.fr Subject: circular files: minor additions and great interest ? Date: Fri, 23 Jan 2004 11:24:37 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <1074853477.4010f665048b8@imp1-l.free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from postfix3-1.free.fr ([213.228.0.44]:57252 "EHLO postfix3-1.free.fr") by vger.kernel.org with ESMTP id S265452AbUAWKYi (ORCPT ); Fri, 23 Jan 2004 05:24:38 -0500 Received: from imp1-l.free.fr (imp1-l.free.fr [213.228.0.144]) by postfix3-1.free.fr (Postfix) with ESMTP id 3696BC419C for ; Fri, 23 Jan 2004 11:24:37 +0100 (CET) To: linux-fsdevel@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hello, To fulfill the purpose of user-transparent file compression, FiST looks very flexible indeed (that widescope project, which also covers the need for crypto, was unknown to me). But as far as circular files are concerned, it looks natural to implement this at file level. All we need in "struct stat" is a pair of extra attribute: one which tells whether the file is circular (circ) and one which remembers the logical end-of-file (eof) and light modifications to system calls from the seek(), read(), write(), and truncate() families. Besides, in order to allow the file to grow in size, one could specify that this is accomplished by seeking to position eof+1 and writing there. Assume we have the following file: data: ABCDEFGH descriptor: fd, currently at offset 5 (character F) circ=3DTRUE eof=3D2 (file ends with character C) read(fd,buf,4) should return 4 and set buf contents to "FGHA" read(fd,buf,8) should return 6 and set buf contents to "FGHABC" etc ... I have the feeling that implementing circular files in the kernel requires minor alteration to the source. I may be wrong. Anyway i hope kernel developers will like the idea, which can help by providing more stability and flexibility to heavily logging applications (syslogs, proxies, mail relays) and admins would not have to bother about disk space anymore !!! Best regards Phil ----- Fin du message transf=E9r=E9 ----- - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html