linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
  • [parent not found: <7zeP5-2ic-15@gated-at.bofh.it>]
  • * Finding hardlinks
    @ 2006-12-20  9:03 Mikulas Patocka
      2006-12-20 11:44 ` Miklos Szeredi
      0 siblings, 1 reply; 87+ messages in thread
    From: Mikulas Patocka @ 2006-12-20  9:03 UTC (permalink / raw)
      To: linux-kernel; +Cc: linux-fsdevel
    
    Hi
    
    I've came across this problem: how can a userspace program (such as for 
    example "cp -a") tell that two files form a hardlink? Comparing inode 
    number will break on filesystems that can have more than 2^32 files (NFS3, 
    OCFS, SpadFS; kernel developers already implemented iget5_locked for the 
    case of colliding inode numbers). Other possibilities:
    
    --- compare not only ino, but all stat entries and make sure that
     	i_nlink > 1?
     	--- is not 100% reliable either, only lowers failure probability
    --- create a hardlink and watch if i_nlink is increased on both files?
     	--- doesn't work on read-only filesystems
    --- compare file content?
     	--- "cp -a" won't then corrupt data at least, but will create
     	hardlinks where they shouldn't be.
    
    Is there some reliable way how should "cp -a" command determine that? 
    Finding in kernel whether two dentries point to the same inode is trivial 
    but I am not sure how to let userspace know ... am I missing something?
    
    Mikulas
    
    ^ permalink raw reply	[flat|nested] 87+ messages in thread

    end of thread, other threads:[~2007-01-12  0:02 UTC | newest]
    
    Thread overview: 87+ messages (download: mbox.gz / follow: Atom feed)
    -- links below jump to the message on this page --
         [not found] <7vc91-5DA-11@gated-at.bofh.it>
         [not found] ` <7vfJT-64R-3@gated-at.bofh.it>
         [not found]   ` <7x0n7-2Dk-5@gated-at.bofh.it>
         [not found]     ` <7x0na-2Dk-21@gated-at.bofh.it>
         [not found]       ` <7x5mR-2wX-3@gated-at.bofh.it>
         [not found]         ` <7x9Ad-18O-35@gated-at.bofh.it>
         [not found]           ` <7yXEy-UI-39@gated-at.bofh.it>
         [not found]             ` <7yYKa-2Ds-3@gated-at.bofh.it>
         [not found]               ` <7zcWP-7ET-5@gated-at.bofh.it>
         [not found]                 ` <7zdzA-jc-27@gated-at.bofh.it>
         [not found]                   ` <7zdJh-xh-37@gated-at.bofh.it>
    2007-01-05 22:36                     ` RFC: Stable inodes for inode-less filesystems (was: Finding hardlinks) Bodo Eggert
         [not found]                   ` <7zeP5-2ic-15@gated-at.bofh.it>
         [not found]                     ` <7zgH9-5my-17@gated-at.bofh.it>
         [not found]                       ` <7zJSM-14t-9@gated-at.bofh.it>
         [not found]                         ` <7zSW5-6cj-9@gated-at.bofh.it>
         [not found]                           ` <7zX9l-4rS-7@gated-at.bofh.it>
         [not found]                             ` <7zXMb-5g5-27@gated-at.bofh.it>
    2007-01-05 23:54                               ` Finding hardlinks Bodo Eggert
    2006-12-20  9:03 Mikulas Patocka
    2006-12-20 11:44 ` Miklos Szeredi
    2006-12-20 16:36   ` Mikulas Patocka
    2006-12-20 16:50     ` Miklos Szeredi
    2006-12-20 19:54       ` Al Viro
    2006-12-20 20:12         ` Mikulas Patocka
    2006-12-31 15:02         ` Mikulas Patocka
    2006-12-21 18:58   ` Jan Harkes
    2006-12-21 23:49     ` Mikulas Patocka
    2006-12-22  5:05       ` Jan Harkes
    2006-12-23 10:18       ` Arjan van de Ven
    2006-12-23 14:00         ` Mikulas Patocka
    2006-12-28  9:06           ` Benny Halevy
    2006-12-28 10:05             ` Arjan van de Ven
    2006-12-28 15:24               ` Benny Halevy
    2006-12-28 19:58                 ` Miklos Szeredi
    2007-01-02 19:15                   ` Pavel Machek
    2007-01-02 20:41                     ` Miklos Szeredi
    2007-01-02 20:50                       ` Mikulas Patocka
    2007-01-02 21:10                         ` Miklos Szeredi
    2007-01-02 21:37                           ` Mikulas Patocka
    2007-01-03 11:56                       ` Pavel Machek
    2007-01-03 12:33                         ` Miklos Szeredi
    2007-01-03 12:42                           ` Pavel Machek
    2007-01-11 23:43                             ` Denis Vlasenko
    2007-01-03 12:45                           ` Martin Mares
    2007-01-03 13:54                           ` Matthew Wilcox
    2007-01-03 15:51                             ` Miklos Szeredi
    2007-01-03 19:04                               ` Mikulas Patocka
    2007-01-04 22:59                               ` Pavel Machek
    2007-01-05  8:43                                 ` Miklos Szeredi
    2007-01-05 13:12                                   ` Pavel Machek
    2007-01-05 13:55                                     ` Miklos Szeredi
    2007-01-05 14:08                                       ` Mikulas Patocka
    2007-01-05 15:09                                         ` Miklos Szeredi
    2007-01-05 15:15                                           ` Miklos Szeredi
    2007-01-08 11:27                                             ` Pavel Machek
    2007-01-08  5:57                                           ` Mikulas Patocka
    2007-01-08  8:49                                             ` Miklos Szeredi
    2007-01-08 11:29                                               ` Pavel Machek
    2007-01-08 12:00                                                 ` Miklos Szeredi
    2007-01-08 13:26                                                   ` Martin Mares
    2007-01-08 13:39                                                     ` Miklos Szeredi
    2007-01-09 16:26                                                   ` Steven Rostedt
    2007-01-09 19:53                                                     ` Frank van Maarseveen
    2007-01-09 20:11                                                       ` Steven Rostedt
    2007-01-11 10:07                                                       ` Pádraig Brady
    2007-01-05 17:30                                   ` Frank van Maarseveen
    2006-12-28 18:14               ` Mikulas Patocka
    2006-12-29 10:34                 ` Trond Myklebust
    2006-12-30  1:04                   ` Mikulas Patocka
    2007-01-01  2:30                     ` Nikita Danilov
    2007-01-01 22:58                       ` Mikulas Patocka
    2007-01-01 23:05                         ` Nikita Danilov
    2007-01-01 23:22                           ` Mikulas Patocka
    2007-01-04 13:59                             ` Nikita Danilov
    2007-01-02 23:14                     ` Trond Myklebust
    2007-01-02 23:50                       ` Mikulas Patocka
    2006-12-28 13:22             ` Jeff Layton
    2006-12-28 15:12               ` Benny Halevy
    2006-12-28 15:54                 ` Jeff Layton
    2006-12-28 16:26                   ` Jan Engelhardt
    2006-12-28 18:17                 ` Mikulas Patocka
    2006-12-28 20:07                   ` Halevy, Benny
    2006-12-29 10:12                 ` Trond Myklebust
    2006-12-31 21:19                   ` Halevy, Benny
    2007-01-02 23:20                     ` Trond Myklebust
    2007-01-02 23:46                     ` Trond Myklebust
    2007-01-11 23:35             ` Denis Vlasenko
    2006-12-29 10:02           ` Pavel Machek
    2007-01-01 22:47             ` Mikulas Patocka
    2007-01-01 23:53               ` Jan Harkes
    2007-01-02  0:04                 ` Mikulas Patocka
    2007-01-03 18:58                   ` Frank van Maarseveen
    2007-01-03 19:17                     ` Mikulas Patocka
    2007-01-03 19:26                       ` Frank van Maarseveen
    2007-01-03 19:31                         ` Mikulas Patocka
    2007-01-03 20:26                           ` Frank van Maarseveen
    2007-01-12  0:00                             ` Denis Vlasenko
    2007-01-03 22:30                           ` Pavel Machek
    2007-01-03 21:09                     ` Bryan Henderson
    2007-01-03 22:01                       ` Frank van Maarseveen
    2007-01-03 23:43                         ` Mikulas Patocka
    2007-01-04  0:12                           ` Frank van Maarseveen
    2007-01-08  6:19                             ` Mikulas Patocka
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox;
    as well as URLs for NNTP newsgroup(s).